Tag Archives: Reporting Services

How to: use select all in a Tablix filter

This post describes one way to let users select all values in a filter in a data area such as a Tablix in Microsoft SQL Server Reporting Services.

During a recent Reporting Services 2008 course (6236) I was asked about how to use filtering in a data region, such as a Tablix, and present an option for the user to select all filter values.

A search for doing this with parameters gives you quite a few tutorials, such as Chris Hays’s from 2004. Searching for the same approach for filtering doesn’t yield the same amount of tutorials. So here is a quick guide for a similar approach for select all in filters.

This guide will use SQL server 2008 r2 and BIDS based on Visual Studio 2008.

Initial tasks for demo

Step 1, start BIDS and create your empty Reporting Services project


Above: Screenshot of the new project dialog.

Step 2, Create a new empty report (not through the wizard)


Above: Screenshot of Add New Item dialog.

Step 3, Create a demo dataset (with an empty data source)


Above: Dataset dialog.

Step 4, Create a Tablix and bind it to our dataset


Above: Screenshot of report body with a Tablix bound to our dataset and with the detail row showing our data field

Step 5, Preview report

To verify that we are still on track, check the preview of the report and make sure it displays our demo data


Above: Screenshot of preview of our not so impressive report

Step 6, Create a Parameter

To be able to filter our dataset through a prompt we need a parameter. We will create a manual one. Please use proper datasets mapped to your data for production reports.


Above: Manual filter items for all and for each of our demo data values.

Step 7, create filter in Tablix

Go to Tablix properties and choose the filter tab.

For our Filter Expression we want to create a filtering expression that can evaluate to true. In a traditional filtering expression we would just choose our field and choose to compare it to our parameter. In this scenario we want to do the logic in this expression so that we can do whatever logic is needed. In this case we choose to compare either to one of the parameter values , or check if the parameter is 0 (our “All” value from the parameter settings)


Above: Expression for Filter

For our Value expression we want to evaluate true so that we can compare the two. Note that we need to enter “=true”, not just “true”.


Above: Screenshot of Filter value expression.

Once we have our two expressions our filter properties for the Tablix will show as this:


Above: Filters dialog in Tablix properties

Step 8, test filtering

Run report and choose All in parameter:


Above: All data visible with All filter

Verify functionality with a specific parameter:


Above: Only some data is visible when filtering with parameter

More on filtering

The whole point on using data area filtering versus using data set parameters can be expanded on quite a bit. There are loads of resources on that around.

But trying to be complete: One aspect is how much data you want to generate from data source on initial report run, another is if you want to be able to run the same report with different data without generating another trip to the source. By using parameters and filtering on the data set you only retrieve a limited amount of data. By using filters you can run your report once against the data source and then filter on the intermediate result in a cache or on a report snapshot.

Demo Report

Here is the report file used in the demo


Setting debug to true in web.config breaks Reporting Services in SharePoint

When using Reporting Services reports in SharePoint and at the same time changing the debug attribute to true in web.config the following error message might appear in a web browser alongside the Reporting Services reports not behaving properly:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3)
Timestamp: Thu, 14 Oct 2010 10:01:21 UTC

Message: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[x]
Line: 129
Char: 12
Code: 0
URI: http://servername/ScriptResource.axd?d=somethingcomplicated…

Changing the following attribute in the correct web.config will remedy the problem, however the debugging opportunities will take a hit…

<compilation optimizeCompilations="true" batch="false" debug="false">

How to: Enable larger reports in Reporting Services

When deploying large reports to SharePoint or Reporting Services from BIDS (Visual Studio) something like the following message might appear:

Error    1    System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. —> System.Web.HttpException: Maximum request length exceeded.    at System.Web.HttpRequest.GetEntireRawContent()    at System.Web.HttpRequest.get_InputStream()    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    — End of inner exception stack trace —    at System.Web.Services.Protocols.SoapServerProtocol.Initialize()    at System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response)    at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)        0    0

This happens when the report is bigger than the maxRequestLength specified in the Reporting Services web.config file. The default is 4 MB so if the Report is bigger than that it will fail to deploy. it will frequently happen if the report contains map reports using embedded esri shape file data…

The solution, apart from making the report smaller, is to increase the maxRequestLength attribute of the httpRuntime Element in the web.config file of the Reporting Services instance. This file might be found in a directory like this for SQL Server 2008 r2: C:Program FilesMicrosoft SQL ServerMSRS10_50.MSSQLSERVERReporting ServicesReportServer

Change the element to the following:

<httpRuntime executionTimeout="9000" maxRequestLength = "16384" />

where the 16384 equals 16 MB max sixe for the reports. Change the value to suit your report size needs…


more information about the element in this article: http://msdn.microsoft.com/en-us/library/e1f13641.aspx


Updated 2012-12-08: The above link is outdated. Here are some alternative resources:

Report and Snapshot Size Limits (SQL Server 2008)

 Modify Reporting Services configuration files [AX 2012]


A Microsoft Update killed printing in Reporting Services

One client recently had a novel experience with their SQL Server 2005 Reporting Services installation. One day the printing feature stopped to work with this error:


Turns out Microsoft decided to kill the print control because of a security issue…

Upgrading SQL Server 2005 with Service Pack 3 installed a new version of the control and solved the problem…