Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add datasources to multiple subreports when last SubreportProcessing

Status
Not open for further replies.

kvang

Programmer
Oct 7, 2005
129
US
I have a localreport (RDLC) has about 12 subreports. Within each subreports, there could be 2-5 more subreports. It is taking the ReportViewer too long to load the report because for every subreport, the SubreportProcessingEventHandler (SubreportProcessing event) is triggered to get data from the database for that particular subreport. All the data are coming from the same database. When the report loads, the application is hitting the database more than 20 times. That is one of the reasons why the report is taking too long to load.

What I am hoping to do is store all the information (parameters and stored procedure for each subreport dataset) to a viewstate or session, then pass an array of stored procedures to the database, get all of the data into one dataset, then load all the subreport when the last SubreportProcessingEventHandler is called. I can do this but the only problem is that the SubreportProcessingEventArgs is not serializable. I hope this make sense. Any suggestions?
 
You're saying that your report has between 24 and 60 subreports. Can't you redesign this report to eliminate some of these subreports? Your efforts may be better served on a redesign instead of trying to hack a fragile process.
 
Yes, there will be around 20-30 subreports. The reason for having so many is because the users want the options to hide and show subreports. Redesigning the report is not in the scope.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top