Solved

Crystal Reports 8.5 VCL - Long Load Time

Posted on 2006-10-26
3
929 Views
Last Modified: 2010-08-05
I have an application in Borland C++ Builder 5 and I use the Crystal Reports VCL component to open reports.  I am having a problem with long load times.  Here is my code:

TCrpe *reportCrpe = new TCrpe( Application );
reportCrpe->ReportName = reportFilename;
reportCrpe->Connect->Retrieve( );
reportCrpe->ParamFields->Retrieve( );
reportCrpe->SectionHeight->Retrieve( );
//Here I set various report and parameter properties.
reportCrpe->Execute( );

My problem is with the first Retrieve.  It usually takes 10-20 seconds to complete (some of my customers report load times as long as 1 minute).  The long load time seems to be caused by the presence of subreports in the report.  I have a very simple 29KB report with one extremely simple subreport.  It takes at least 10 seconds to load.  When I remove the subreport it takes less than a second to load.  I also have a very complex 1.1MB report with many complex subreports and it takes just as long as the 29KB report with the subreport so it doesn't seem to depend on the size of the report, just the presence of subreports.

I would like to know whether this is just the normal operation of the component or if there is some sort of solution to this problem.  Unfortunately, I am not able to upgrade to the latest versions of the VCL component because they require at least C++ Builder 6 and I cannot upgrade from C++ Builder 5.

Thank you in advance for your reponses.


--Adrian
0
Comment
Question by:AdrianSRU
3 Comments
 
LVL 12

Accepted Solution

by:
AdrianSRU earned 0 total points
ID: 17811448
I have figured out why the report is taking so long to load.  My subreports are set to 'Re-import when opening'.  Apparently when that flag is set in the report the VCL also attempts to re-import it.  When I unchecked that option the report loaded very fast.  What I would like to know now is if there is a way to specify in code that the subreports should not be re-imported.


--Adrian
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17811882
That is very true.  Since you are opening the report the subreports will get reimported.  Useful if the subreports change but otherwise not really.

mlmcc
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question