Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Report Content Blank

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.

like image 211
jtlovetteiii Avatar asked Apr 26 '13 14:04

jtlovetteiii


2 Answers

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

like image 90
JumpingJezza Avatar answered Oct 18 '22 07:10

JumpingJezza


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);});
like image 31
Joel Kapuku Avatar answered Oct 18 '22 06:10

Joel Kapuku