Since the title is not explanatory, let me explain the topic here first. Recently I was asked to look into custom SSRS reports which were working fine until recently it started throwing intermittent errors where the report was not rendering. Users were getting the below errors.
- Reports were rendering empty with no data
- “An error occurred during client rendering”
- The underlying connection was closed. An unexpected error occurred on receive
Since the errors were not consistent, the first thing we tried is identify if some change has been made in the report service configuration. Confirmed with our administrator that no changes in the report server configuration.
So we were back to the reports. So first of all I asked the developer to check if the reports are working fine from BIDS consistently. Verified it worked just fine. So after going over the issue for almost 3-4 hours finally found the root cause.
A recent parameter has been added to the report which contains significant number of values. This error occurs simply because your report uses more than the allowed number of elements in the filters/parameters. The default limit is 1000, but you can change it.
Locate the web.config files of the ReportManager and ReportServer. Files are usually in this location (I have reporting services 2012)
C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportManager\Web.config
C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\Web.config
Add the below appSettings elements. If the appSetting section is not present, then add the below values along with the section.
<add key="aspnet:MaxHttpCollectionKeys" value="30000" />
<add key="aspnet:MaxJsonDeserializerMembers" value="30000" />
Restarted the SQL server reporting services and the reports started coming up.
Please note that these errors we were getting might be caused for other issues as well. However this can be one of the possible causes.
Hope this helps.