Thursday, August 22, 2013

Empty Report Viewer When Processing Large Reports with SQL Server Reporting Services

I was struggling with this issue for the last couple of hours. In one of my ASP.NET web applications, I have a report viewer which renders reports in SQL Server Report Services as Server Reports. The issue was when processing a large report, after showing the classic “Loading” icon for sometime, the “Loading” icon disappears and I am getting an empty report viewer.

Of course, I thought it should be some kind of timeout and started checking timeouts. SQL Server TechNet has described all the possible timeouts which can affect my issue, and changed all the required timeouts as per the need.

Unfortunately I was still facing the same issue. Now what I did was, I have directly accessed the SQL Server Report Manager and opened the report. After like 5 minutes my report was opened in the browser and in that case I didn't face any timeouts issues.

Now I was quite clear, if there was something with the timeouts in SQL Server side, I don’t have them anymore. Now the only place left to examine was my web application.

The time it takes to disappear the “Loading” icon in the report viewer was around 90 seconds. Then I found out the the default value of AsyncWaitPostBackTimeout of the ASP.NET:ScriptManager is 90 seconds. I had a ScriptManager in my web application and I just increased the AsyncWaitPostBackTimeout  value and now the issue is totally resolved. No more "Loading" and empty report viewer, I am getting the report, of course after some time.

Happy Coding.

Regards,
Jaliya

4 comments:

  1. I have also faced this problem some times, while programming ASP.Net to fetch lots of records from SQL Server. Solution which I found was to set the timeout property of the command object to '0' and the problem was solved.

    ReplyDelete
  2. It's good you shared this, because I also stumbled upon such a problem. I realized that it was about the timeouts but I didn't find out that the reason was in AsyncWaitPostBackTimeout property of ScriptManager - so thank you very much for this solution.
    May I ask: how big (in term number of records) your report was - so it took about 5 minutes to render?

    ReplyDelete
  3. Thank you for sharing.

    ReplyDelete
  4. Thanks for sharing. It fixed my issue

    ReplyDelete