Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: why is my subreport bogging Horribly? Post Reply Post New Topic
Page  of 2 Next >>
Author Message
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Topic: why is my subreport bogging Horribly?
    Posted: 06 Jun 2013 at 7:29am
Issue: Report is thrashing, and doesn't respond(have to kill crystal)
Environment: Running BO XI locally on Win7 Pro x64
Report details: running against SQL 2005 DB.
This report runs great currently, but I'm trying to implement a modification.
I'm adding fields to a subreport.
I duplicated the formulas, params,and running totals ON the subreport field explorer so that I could access some of the same data that the report uses.
Is soon as I place a formula field onto the subreport and run it, the report dies a slow death....
 
E.G.
if I make the formula equal:
if datediff("m",{ServiceSetups.StartDate},{ServiceSetups.CancelDate})  in 2 to 7 then "umm" Everything is great, and I get "umm" on my report.
 
If I replace "umm" with say,  {commission}, which is currently used in the Main report, it dies...
 
 
I'm sort of new to subreports...
 
Thanks lads,
Rich
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jun 2013 at 9:25am
just a guessbut...
if you use a field from a table that was never used in the report before you may now be 'enforcing' a join which just changed the size of your data set and may have turned a small data set into a huge data set (especially if you did not join the table giving you a cartesion result).
crystal does not enforce joins unless you explicitly set the enforement in the join set up or if you use fields from both tables in the join.
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 07 Jun 2013 at 3:09am
no new fields at all:
what I did was to replicate the formulas and params that are used on the Main form on the subreport.
R
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jun 2013 at 4:05am

in the subreport using a field can change the data results. To test the theory, in the subreport make the subreport as it was when it was running OK.

Add a count (not distinct count) of any field you already have in the report canvas (not just in your data set).
Place that in the report header. Note the result.
now drag the commission field into the report header and watch to see if your count changes.
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 07 Jun 2013 at 5:23am
I saw a count of 1 returned when I created a count of an existing sub-report field.
I added {commission} then promptly observed the same hang....
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jun 2013 at 5:30am

likely a join issue (or lack of a join)

in the sub report look at the Database screen and then the joins tab.
Look to see if all the tables are joined. If not I am guessing the table that the commision field is in is not joined at all.
if that is the case, when you added it to the report it enforced the lack of a join and you get a cartesion result which is every permuation of row to row connection (a table with 10 rows and another table of ten rows will give you a dataset of 100 rows, not 10).
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 07 Jun 2013 at 5:55am
bummer, the Commission field, is derived from two tables, both of which are joined.
:(
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Jun 2013 at 5:59am
well it is still the likely suspect. Just because it is not a cartesion result does not mean tnhat you are not changing your resulting data set.
just to test it again get it back to the OK performance and drag a different field from the same table as the commision into the sub report and see if you get the same issue. 


Edited by DBlank - 07 Jun 2013 at 6:10am
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 07 Jun 2013 at 6:01am
just so we're on the same page, commission is a formula
I'll try & work my way backward & see where the drag is..
 
thanks much for the help so far!
R
 
IP IP Logged
celticpiping
Newbie
Newbie
Avatar

Joined: 25 Oct 2007
Online Status: Offline
Posts: 24
Quote celticpiping Replybullet Posted: 07 Jun 2013 at 6:06am
I MAY be onto somethign...
IP IP Logged
Page  of 2 Next >>
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.000 seconds.