Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Crystal Report Slow processing Post Reply Post New Topic
Author Message
Asif Sharif
Newbie
Newbie
Avatar

Joined: 06 Mar 2012
Location: Pakistan
Online Status: Offline
Posts: 5
Quote Asif Sharif Replybullet Topic: Crystal Report Slow processing
    Posted: 06 Mar 2012 at 3:55am
I am using crystal reports for visual studio 2005 for generating a report
The problem is that the report is taking so much time between the navigation of pages, and if we click the print button, system freezes,(may be because crystal report completely process report before send it to printer) so we are unable to print, I also try direct printing the report(without previewing it), report contains 2 sub reports, I used sub reports because I have to display the data in parallel like
Record 1
Child A          Child B
Child C          Child D
If I don’t use sub reports there will be white space between child A and C or child B or D because their records are not fixed, I check the report with sub reports suppress, and report works fine, I have to use sub reports and I have almost 30000 records for main report and 30000 for 1st sub report and almost 74000 for 2nd sub report, I check for 1 hour but its processing is not ended.
I m using datasets as data source for reports, I also try direct stored procedure but it not solved my issue
So if I remove sub reports my slow processing issue is fixed but I can’t display records in parallel
So there is any way to fix this issue, as for workaround I can filter records, but our clients require all records at a time
Is there any solution in any newer version of crystal reports?
Even it is acceptable for me, that somehow I just start printing the report, and then it takes time so it is acceptable. But at this time I can’t print the report.


Edited by Asif Sharif - 06 Mar 2012 at 4:06am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 06 Mar 2012 at 5:30pm
What kind of data is in the child sub-reports?
 
For EACH time a subreport is called, Crystal connects to the database and runs a query.  If you're calling 4 subreports 30000 times (the number of records in your main report * 4 subreports) that means that Crystal is connecting to the database or your datasets 150000 times to run your report.  This is what is slowing things down.
 
Unfortunately, I don't think there's any way around using the subreports unless the users change the layout requirements.
 
-Dell
IP IP Logged
Asif Sharif
Newbie
Newbie
Avatar

Joined: 06 Mar 2012
Location: Pakistan
Online Status: Offline
Posts: 5
Quote Asif Sharif Replybullet Posted: 06 Mar 2012 at 10:25pm
Thanks for reply
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Mar 2012 at 3:21am
well....
 
here's a thought, as it removes the connection to the database, but only works from an application.
 
have your application gather the data into the dataset, so that everything you need for the report and all the subreport is in the dataset, then 'push' the dataset to the report.  This results in 1 call to the db and CR will process the file...it might still take a while to process, but it removes the vast majority of the calls to the database.
 
For the report, the report source is Ado.NET.
 
If nothing else, it is worth a try.
IP IP Logged
Asif Sharif
Newbie
Newbie
Avatar

Joined: 06 Mar 2012
Location: Pakistan
Online Status: Offline
Posts: 5
Quote Asif Sharif Replybullet Posted: 07 Mar 2012 at 3:47am
Thanks for your suggestion, but i am already using your suggested model, if it is not possible to increase processing time,i just want somehow i print the report
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Mar 2012 at 3:56am
subreports are still slow, regardless of how they are called...
I try and avoid subreports.  If I have all the data, I usually return a really wide record to the report, then it is just a matter of conditional suppression and grouping to replicate the subreport information
 
Yes, I realize that this is not always possible, but I think in the majority of cases it is.  I've written my fair share of medium to complex reports (at least I think they are...who knows) and out of those the ones that I needed a subreport I can count on 1 hand, and they were usually just because I needed A VALUE to populate, not a whole report (and I hated that I could determine a better a solution).
 
Just trying to think, and I missed Hilfy's comment about connecting to the datasets...which is basically swapping out what CR is reading at the time...which of course takes time.
 
The only other thought that came to mind is to put the subreports in different versions of the same band (detailA, detailB, etc) and conditionally suppress them if they are not needed (and you can tell this without calling them)
 
HTH
 
 
IP IP Logged
Asif Sharif
Newbie
Newbie
Avatar

Joined: 06 Mar 2012
Location: Pakistan
Online Status: Offline
Posts: 5
Quote Asif Sharif Replybullet Posted: 07 Mar 2012 at 4:13am
thanks again for your suggestion, but i have to show both sub reports every time.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 07 Mar 2012 at 4:26am
ok, that only leaves trying to reduce your dataset to one large table, otherwise, it would seem that you won't be able to accomplish your goal of printing.
 
not that transforming the report is a guarantee of success, it is just the only way to remove the subreports from the report which are slowing it down.
 
I guess there is the option to only increase the 'main' data a little, enough to encompass one of the subreports, which might allow the report to complete as you just removed 30k of switching
 
it's a thought
IP IP Logged
Asif Sharif
Newbie
Newbie
Avatar

Joined: 06 Mar 2012
Location: Pakistan
Online Status: Offline
Posts: 5
Quote Asif Sharif Replybullet Posted: 07 Mar 2012 at 4:37am
thanks for your valuable time, but my report design restrict me to use sub reports, yes you are right that sub reports can be merge in main reports and we use group for it, but here i require some child records should display in parallel which i can't achieve with out sub reports
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.