Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: 2 Tables matching with each other Post Reply Post New Topic
<< Prev Page  of 2
Author Message
Memoli28
Groupie
Groupie
Avatar

Joined: 10 Apr 2009
Online Status: Offline
Posts: 58
Quote Memoli28 Replybullet Posted: 16 Apr 2009 at 7:59am

GH1:     (GROUPNAME 1 @LOCATIONMASTER)  (@STATUS)

GH2:                        (GROUPNAME 2 @WLMSTLOCATION) (SUM OF@AV+AL)

D: TBWHLC.LCUNIT/TBWHLC.LCRACK/TBWHLC.LCPSTN/TBWHLC.LCLVL (@LOCATIONMASTER) (@WLMSTLOCATION) WLMST.LIUNIT/WLMST.LIRACK/WLMST.LIPSTN/WLMST.LILVL  WLMST.LIAVQY/WLMST.LIALQY  (@AV+AL)

 

 

STATUS FORMULA:

if (isnull (Sum ({@av+al}, {@locationmaster})) or Sum ({@av+al}, {@locationmaster})=0) then 'Empty' else 'Not Empty'

Result:


 GROUP 1:                    SUM:                   STATUS:
10-006-013-04                                          EMPTY
10-006-013-05                                          EMPTY
10-006-014-01              0                          EMPTY   
10-006-014-02             26                       NOT EMPTY

so my goal is to see only the empty -status.

I am able to select on sum-field but i can only select values,blanks will not be shown.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Apr 2009 at 8:49am
Couple of ways you can go.
First rather than limiting your data in the select statement you could conditionally suppress records on your status formula. This is the easiest but needs to account for any other summing you are doing any.
conditionally suppress sections with: {@status}="NOT EMPTY"
 
Second option. Adjust your AV+AL formula so it accounts for the NULLS. This way you will get sums even if it there is NULL. Then your Group condition selection will select either issue.
I am guessing it is something like:
Field a + field b.
Change it for the NUlls something like
if isnull(field a) then 0 else field a + field b
 
Do either of these fix the issue?
 
 
IP IP Logged
Memoli28
Groupie
Groupie
Avatar

Joined: 10 Apr 2009
Online Status: Offline
Posts: 58
Quote Memoli28 Replybullet Posted: 16 Apr 2009 at 9:19am

Dear Dblank,

Thanks a lot.

I tested second option and selected on sum field =0 and indeed also null values appear in the report.

Thanks a lot for your help.

Regards,

Memoli

 

 

IP IP Logged
<< Prev Page  of 2
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.