Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal report X1 design question Post Reply Post New Topic
Author Message
raysas
Newbie
Newbie
Avatar

Joined: 28 Oct 2008
Location: United States
Online Status: Offline
Posts: 3
Quote raysas Replybullet Topic: Crystal report X1 design question
     Posted: 28 Oct 2008 at 12:45pm
Hi,
I have a design question related to crystal reports.I was working on a design which had one main report and 3 subreports.The sub report linking was done between the main and each of the sub reports,but there were major performance issues as the data ran in to few thousand records and due to the sub report linking each sub report also runs that may times as the main report resulting in very poor performance beyond acceptable limits.Each of these reports run in about 5-6 minutes when run individually.But when run as a consolidated report with sub reports it takes more than an hour.
Each of the reports uses a separate stored procedure for the data.
It looks to me like this is design is not going to work in this case.I also cannot filter the data at the SP level as the users would not accept it.

Please suggest me an alternative design approach or any means by which the performance can be enhanced.

Thanks,

Saswat
-Saswat ray
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 Oct 2008 at 1:39pm
I have long disliked subreports and found that they are often overused.  That said I still use them though sparingly. 
 
As an alternative, I suggest you look at two things. The first is the use of command objects to query the data you use in the subreport and then place them in the way you want them displayed in the report.
 
The second way which may help with the first suggestion is to look at the use of groups and perhaps multiple levels of grouping.
 
These can really help with performance. The command objects can push a lot of processing back to the database, and grouping avoids the multiple passess for processing the report that subreports requires.
 
I had a similar experience with a report though not using a subreport where performance was not tolerable. By rewriting my queries I was able to reduce the report generation from many minutes to about 30 seconds. My point is that this rewriting of the queries was time well spent.
 
Others may have additional suggestions.  I hope you can get the report.
 
Regards
 
John W.
 
 
 
IP IP Logged
raysas
Newbie
Newbie
Avatar

Joined: 28 Oct 2008
Location: United States
Online Status: Offline
Posts: 3
Quote raysas Replybullet Posted: 28 Oct 2008 at 2:16pm
Hi John,

Thanks for your reply and the valuable suggestions.
My stored proceures returns 6000 records in around 30 secs when I run them in sql tool for 1 set of parameters.But when i run the report for the same set of params it takes me around 10-15 mins with both the main report and the sub report.Also Some of the Crystal Reports native database drivers do not support the Add Command feature.Sybase Server being one of them and My data base is sybase.
Also I am doing a 5 level grouping in both the reports, but it does not seem to be helping the cause.
Should i look at other design changes like having a single stored proc instaed of invividual procs for each report.Please advice if any design change would help.

Thanks,
Saswat
-Saswat ray
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 29 Oct 2008 at 7:15am
I am not familiar with the drivers for the Sybase product, I generally code againt Microsoft stuff (Access, FoxPro,SQLServer, etc.). Somewhere, I have heard; I think it may have been something Brian wrote in one of his reference books,  that you can sometime resolve the ability to use the SQL Command object  and SQL Expressions by using an ODBC connection rather than the native drivers. If thats not how you are connecting the database it may be worth a try.  Stored procs are hard to improve on as far as speed. What is likely slowing down your report is the number of passes CR has to make to  generate each of the subreports being used. In the CR multi pass model take each sub report, add the main report and
multiply the number of passes... well you get the idea.
 
Perhaps others will have more suggestions,.
 
Regards
 
John W.
 
 
IP IP Logged
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