Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Joining Multiple Views Post Reply Post New Topic
Page  of 2 Next >>
Author Message
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Topic: Joining Multiple Views
     Posted: 06 Jun 2011 at 8:43am
I have a report that already has a view1 joined with other tables in the report. I have a crosstab that does the count of Building ID and summary of Structure Area. Now I have to use another view2 which calculates a value for a required field and both view1 and view2 have some common fields and have joined them with a left outer join between view2 and view1. Now, when I refresh the report the crosstab values for the count of Building ID remains the same but the summary for the structure area has increased by a factor 0f 80 !
             I tried using a running total for the structure area to calculate the summary with different evaluate and reset values and it didnt work, tried playing around with the view links and it didnt do anything to fix the strucutre summary. I am trying to get the old summary value for the structure area but it seems like after adding the view2 the value just jumped up way too high but the strange thing is, the count of the Building ID is still the same. So could someone shed some light on this if you know what could be causing this shift in summary values. Thanks!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jun 2011 at 9:45am
most likel your new view is causing a cartesian product (now multiple rows where there was one)
IP IP Logged
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Posted: 06 Jun 2011 at 10:11am
Ok. So what do you think should be done to avoid the cartesian product? Thanks.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Jun 2011 at 12:01pm
usually you have to alter your running totals so that they do not sum all the rows but ony the ones you want.
hard to say without knowing your exact design and rows but often changing the evaluate portion of the RT to change of a ditstinct primary key field works
IP IP Logged
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Posted: 07 Jun 2011 at 2:21am
Ok. Thanks Buddy! I will try to work with the running totals.
IP IP Logged
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Posted: 08 Jun 2011 at 5:27am
It looks like when I place the structure area field on the detail section, the values remain correct, but then when I sum it in a formula and place it in the detail section the values remain ok until the 43rd record ( I placed a recordnumber formula next to the field to see how the record numbers are doing). So after the 43rd record, the numbers go too high and the next record number shows 122 instead of 44. So I am a bit confused as to why everything is fine until record number 43 and then all hell breaks loose.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2011 at 5:43am
are you suppressing rows?
Suppressing rows do not exclude them from calculations.
IP IP Logged
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Posted: 08 Jun 2011 at 5:58am
No. I am not suppressing rows anywhere.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jun 2011 at 6:04am
I would double check to make sure you are not using any conditional suppression.
The record count jump sounds like it.
What is your formula for the SUM process?
IP IP Logged
moontide
Groupie
Groupie
Avatar

Joined: 23 Feb 2011
Online Status: Offline
Posts: 78
Quote moontide Replybullet Posted: 08 Jun 2011 at 7:10am
formula detail section is:
 
whileprintingrecords;
numbervar SUM;
SUM := SUM + {STRUCTURE_AREA};
SUM;
 
IP IP Logged
Page  of 2 Next >>
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