Hi Ludek,
I have received some feedback from the business. After applying/verifying the changes recommended by you all in this thread the business has seen some improvement with performance. Report in older version used to load in 10 secs, where as now it loads in 35 secs. It used to take over 43 secs before the new fixes. So seems like a good start but there are room for improvement.
I was able to get the two CR reports (one old and one new converted) and will attach it in zip file to your personal email. They have given us the reports with the corresponding web.config files. Not sure how to post all of them here, so I will send them to your email.
I have also recommended them (as per your advice) to try putting report in session. They have tried that option but has been seeing issues implementing it. I think they need direction verifying the logic of putting report in session. The initial load works but on 2nd load they see issues. Below is their code (they use vb):
+ It doesn't look like crReportDocument has all the info those are needed for the second load. It doesn't make sense to me cr will need the database location/connection or parameters for the second load, but I thought I would try to provide the info for the second load to see if it would bypass the error. So, I modified the code as the following:
Dim crReportDocument as New CrystalDecisions.CrystalReports.Engine.ReportDocument ' This object is defined as class member, not locally
....
Dim physicalPath as string = ..... This is <path/filename of the cr report>
crReportDocument.Load(physicalPath)
....
< here we setup the connection to database with user name /password for the crReportDocument object>
If Not IsPostBack then
CrystalReportViewer1.ReportSource = crReportDocument ' We assign cr report document to the cr viewer control in the page.
Session ("crreport") = crReportDocument
else
If Session("crreport") is nothing then
<log the error. I never hit this path, meaning cr report data has been stored in the session>
else
CrystalReportViewer1.ReportSource = Session("crreport")
end if
end if
<then, here we initiate parameters ceParameters for the cr report viewer control>
CrystalReportViewer1.ParameterFieldInfo = ceParameters
CrystalReportViewer1.RefreshReport
The result for this is:
- First load is the same as previous one - 35 secs.
- Second load (select a group tree item). This hang. I have the spinning picture standing there until I close the page. In the log, I have the following error :
I can't figure out what object CR looks for. My questions are:
+ Can you see what is missing or wrong in the logic of using the session?
+ What is the object CR looking for if you can trace it out from the error?
+ Is there any property that need to be set for the crystal viewer control in the asp page to tell cr using session?
Your advice will be much appreciated
Rafiq