Skip to Content
0
Former Member
Dec 02, 2008 at 03:52 PM

ReportDocument Constructor - takes a long time

48 Views

Hello,

I'm working on a report viewer/exporter written in C#.

The following code line takes about 5-10 seconds.

CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new ReportDocument();

I have read on this forum that the Engine needs to buffer some things (?) at the first instance création.

So I tried this code, that confirms what I readed.

// Next line takes 5-10 seconds
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new ReportDocument();
// Next line is really fast (less than 1 sec.)
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt2 = new ReportDocument();

But I have already seen this application loading itself in less than 2 seconds (without code modification).

Is there a way not to take a so long time ? Configuring the engine before creating a report instance ? Using a particular crystal runtime ?

Thanks.