7
votes

I am having a problem running reports in Sql Server Reporting Services (SSRS) 2008 R2.

After setting up the site, creating a few users, and uploading a few reports, I select a report to run, enter my parameters, and wait for the report to render...but nothing happens. I see the "Loading" animation for a brief amount of time (varies between one and ten seconds irrespective of the report), but it soon disappears, leaving nothing except for the parameters at the top of the page. No report content is rendered at all.

This occurs on every report that I deploy to the SSRS instance regardless of size, number of parameters, etc. Most of the reports have around eight parameters of similar type, and their layouts are all of a relatively tabular format: there are several "sections", each containing a table that may have grouping and/or repeating rows. On average, each table contains about six fields. The queries that support the report datasets are not terribly heavy-weight: I can run them against SQL in under a half-minute in most cases.

I have examined and implemented the solutions in the following questions, but neither of them corrected the issue.

(Related to Safari/Chrome) SSRS 2008 R2 - SSRS 2012 - ReportViewer: Reports are blank in Safari and Chrome

(Related to running browser as Administrator) SSRS 2008 - Reporting Services Webpage is Blank except for headers

Other options that I have considered include running the reports from the computer directly instead of through Remote Desktop, and running the reports from other computers on the network other than the server that hosts them. Neither option bears consistent success.

What I have determined, however, is that this problem is directly related to the number of parameters passed to the report. For instance, most of my reports have upwards of six or seven multi-select parameters; each of them is populated at runtime from the database. If users perform a "Select All" or otherwise select a large number of the options in the parameter selection, the above-mentioned issue appears. However, if users are specific with their parameters and only select a few, then the report renders correctly.

Further complicating this situation is the fact that it suffers from the "works-on-my-machine" syndrome. It occurs in some environments but not in others.

As mentioned, I am able to run the reports by limiting the number of selected parameter values; this works in every environment. I am curious, however, as to why this happens (an internal SSRS limit, perhaps?), and what I can do to consistently avoid it in the future.

4
Would you add some details such as how long it takes to run and how many fields of data it pulls?StevenWhite
Try using something like Fiddler to check your traffic, see what's going on. Checking the iis / server log may help as well.Jeroen
@StevenW - Updated with more specific details about the report size and runtime, thanks for your comment!jtlovetteiii
@Jeroen - HTTP request logs don't yield any pertinent results; what is odd is that the HTML source of the page shows <table> elements containing the data that I expect to see in the report. That led me to believe that the issue was related to one of the questions referenced in my post, but the solutions are not congruent.jtlovetteiii
@jtlovetteiii - Reporting services has a timeout that causes it to just go blank after loading for too long. If you have the report set to cache, it will display instantly if you re-run it. Check the timeouts in the report and on the server.StevenWhite

4 Answers

1
votes

I had the same problem and by following Alex Zakharov's suggestion I found a parameter that had almost 700 rows with them all selected by default. Deselecting a few rows resolved my issue immediately, but that was unsatisfactory for a production release.

Looking for the log files suggested by lrb (\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles\) I found the following error message:

ERROR: HTTP status code --> 500
-------Details--------
System.Web.HttpException: The URL-encoded form data is not valid. ---> 
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()

Solution

This led me to this answer to find and update the web.configs, add the lines of code below and then restart the service.

<appSettings>
    <!-- default is 1000 -->
    <add key="aspnet:MaxHttpCollectionKeys" value="2000" />
</appSettings>

I had to update in 2 places, because SSRS has separate websites for report manager and report server: \Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer\web.config

\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\web.config

0
votes

There is no internal constraints for parameters!

First suggestion: Do easily debug, with displaying labels if table returns "no value"


I solved the same problem with the corrected query syntax for the parameters in the SQL query:

...
WHERE t.FieldName = ISNULL (@parameter, t.FieldName)
AND t.FieldName2 = ISNULL (@parameter2, t.FieldName2)
...
0
votes

I ran into the same problem with drop down multi-choice parameter with long list of possible values (>100). Check your situation and investigate which parameter breaks a report.

0
votes

SUGGESTION

I just feel like sharing my solution to this question as well. After so much struggle and so many tries, my problem was more on the front end, there was one piece of code which I was missing which was returning blank pages, but the server the report was working well.

Using Angular to return HttpResponseMessage from a web API, initially this is how my call was:

$http.get(url + 'Report/getUsersReport?CustomerId=' + searchCriteria.customerId + '&fromDate=' + searchCriteria.fromDate + '&toDate=' + searchCriteria.toDate).then(getContractsForBackOfficeReportComplete, function (err, status) {defered.reject(err);});

and after add this line of code { responseType: 'arraybuffer' }):

$http.get(url + 'Report/getUsersReport?CustomerId=' + searchCriteria.customerId + '&fromDate=' + earchCriteria.fromDate + '&toDate=' + searchCriteria.toDate, { responseType: 'arraybuffer' })(getUsersReportBackOffice, function (err, status) {
defered.reject(err);});