Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: 1 to Many w/o Sub Reports??? Post Reply Post New Topic
Author Message
moosehead
Newbie
Newbie


Joined: 01 Aug 2009
Location: United States
Online Status: Offline
Posts: 3
Quote moosehead Replybullet Topic: 1 to Many w/o Sub Reports???
    Posted: 27 Sep 2009 at 3:28pm
I have a large, complicated report with a structure like so:
 
Project Record (Parent) Fields  1 to 1 with Project
   Sub Records 1   0 to many with Project
   Sub Records 2   0 to many with Project
   Sub Records 3   0 to many with Project
   Sub Records 4   0 to many with Project
   Sub Records 5   0 to many with Project
   Sub Records 6   0 to many with Project  
 
I've tried the normal approach which for me is to create a sub report for each of the sub sections. The performance is so bad that it is not close to usable.
 
I've tried all kinds of groupings with suppressions, etc with everything on the parent report but the results are wildly unpredicatable. All of the sub sections appear to react to each other in ways that I can't control with limiting formulas etc.
 
Has anyone successfully faced this problem before?
 
Thanks, Moosehead
thanks!
moosehead
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 Sep 2009 at 6:12am
Subreports, in general, are a bad idea.  Each subreport results in a another hit to the database.  So if your main report has 100 records, you will make 601 calls to the database...very resource intensive.
 
How I tend to handle any report is to create a stored proc which has the data for every field in every record, so there may be lots of records, but only 1 call to the database.  With all the data, the rest is just grouping or sorting.
 
I deal with a special case where subreports don't call the DB...I use a disconnected recordset (ADO.net), so my subreports just look at the data that is already there, but I still try to avoid subreports.
 
HTH
IP IP Logged
moosehead
Newbie
Newbie


Joined: 01 Aug 2009
Location: United States
Online Status: Offline
Posts: 3
Quote moosehead Replybullet Posted: 28 Sep 2009 at 6:23am
Thank you for your reply. How do you get around pulling a cartesien product for the sub report data?
 
For instance, since I have 6 sub reports how do you create one data set that doesn't have those reports creating a huge number of rows?
thanks!
moosehead
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 Sep 2009 at 10:39am
It depends, since I don't know your data, and I don't know how disjointed it is, the best that I can say, is...you don't.
 
You get a huge number of rows, and then you use conditional suppression to...no wait.
 
I see your point, the data isn't going to group/display correctly.
 
usually I only have 1 detail section...maybe multiple lines but they are alternative views of the detail line, not 6 completely different sets of data in what is basically 1 detail line.
 
I must be blessed with much simpler reports as all of my data is related and my users just want their numbers and not lots of other data
 
sorry, I guess my solution won't work for you.
IP IP Logged
moosehead
Newbie
Newbie


Joined: 01 Aug 2009
Location: United States
Online Status: Offline
Posts: 3
Quote moosehead Replybullet Posted: 28 Sep 2009 at 10:59am
Thanks for your try! The strategy that I'm working with is to move only the most complex and resource hogging sub report into the main report. I will end up with a slow report, but not one that dies on the highway!
thanks!
moosehead
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.020 seconds.