cancel
Showing results for 
Search instead for 
Did you mean: 

CR 10.2 Performance Problem after print / export

Former Member
0 Kudos

I hit some performance issues after exporting / printing the report. By the way, I am using Crystal Report 10.2 that comes with VS 2005 to develop my reports.

I use ReportDocument to load my reports, set database connection at runtime using ApplyLogOnInfo and VerifyDatabase. After that, report is loaded into Crystal Report Viewer. Before I export / print any of the reports, the performance is good. All the reports load between 1 - 2 seconds. However, as soon as I exports / prints a report, it takes around 10-15 seconds to load the reports. The performance slow down will continue until the application is restarted.

I've tried removing the part where setting database connection at runtime. The performance after printing / exporting is slightly better, which takes around 5-8 seconds to load the report. But, still not good enough.

I found out that ReportDocument.Load() and ReportDocument.VerifyDatabase() contributes to the slow performance. Does anybody know why or what causes the performance to slow down after printing / exporting?

ADAPT00556608 Patch ID: 38641491

Description:

A .NET application that changes database servers at runtime and exports a report will cause a memory leak.

New Behavior:

Several major memory leaks are fixed in the .NET print engine, the query engine, and the database and export libraries.

By the way, I found fix in service pack for CR XI that is quite similar to what I am experiencing. Not sure if this issue applies to CR.NET 10.2 as well...

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Apply SP 1 for CR 10.2 from here;

https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe

Make sure you use .Close and .Dispose to clean up any report objects you do not need anymore.

E.g;

private void Page_Unload(object sender, EventArgs e)

{

if (boReportDocument != null)

{ boReportDocument.Close();

boReportDocument.Dispose();

GC.Collect();

}

}

Ludek

Former Member
0 Kudos

Installing the service pack does not solve my problem.

Thanks anyway.

former_member183750
Active Contributor
0 Kudos

Ok. To be honest, this is a 180 degree twist on a familiar issue. Usually it's the 1st report that is slow to load and subsequent reports load fast. You're closing and disposing of the report object? This is a must.

Verify database checks the structure of the data to see if it matches what the report expects. In some cases, if the structure changed, the report will do minor adjustments automatically. If your database is not going to change, do not use verify. If will result in slower processing.

Enable "No Printer" and see if that helps (Design | Page Setup).

What version of CR are these reports created in? Do they have "Saved data" option enabled?

What is the database you are connecting to and connection type?

List the Crystal Reports references you are making in your project.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Answers (0)