WinForms ReportViewer: slow initial rendering

Posted by Bryan Roth on Stack Overflow See other posts from Stack Overflow or by Bryan Roth
Published on 2009-01-09T21:49:05Z Indexed on 2010/04/28 23:57 UTC
Read the original article Hit count: 1631

Filed under:
|
|
|

UPDATE 2.4.2010 Yeah, this is an old question but I thought I would give an update. So, I'm working with the ReportViewer again and it's still rendering slowly on the initial load. The only difference is that the SQL database is on the reporting server.


UPDATE 3.16.2009

I have done profiling and it's not the SQL that is making the ReportViewer render slowly on the first call. On the first call, the ReportViewer control locks up the UI thread and makes the program unresponsive. After about 5 seconds the ReportViewer will unlock the UI thread and display "Report is being generated" and then finally show the report. I know 5 seconds is not much but this shouldn't be happening. My coworker does the same thing in a program of his and the ReportViewer immediately displays the "Report is being generated" upon any request.

The only difference is that the reporting server is on one server and the data is on another server. However, when I am developing the reports within SSRS, there is no delay.


UPDATE

I have noticed that only the first load of the ReportViewer takes a long time; each subsequent load of the same or different reports loads fast.


I have a WinForms ReportViewer that I'm using in Remote processing mode that can take up to 30 seconds to render when the ReportViewer.RefreshReport() method is called. However, the report itself runs fast.

This is the code to setup my ReportViewer:

rvReport.ProcessingMode = ProcessingMode.Remote
rvReport.ShowParameterPrompts = False
rvReport.ServerReport.ReportServerUrl = New Uri(_reportServerURL)
rvReport.ServerReport.ReportPath = _reportPath

This is where the ReportViewer can take up to 30 seconds to render:

rvReport.RefreshReport()

© Stack Overflow or respective owner

Related posts about reportviewer

Related posts about ssrs