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?
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?