Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: NULL datasets in subreports Post Reply Post New Topic
Author Message
dbodell
Groupie
Groupie
Avatar

Joined: 08 Nov 2011
Location: United States
Online Status: Offline
Posts: 53
Quote dbodell Replybullet Topic: NULL datasets in subreports
     Posted: 26 Mar 2013 at 7:33am
I have a report that has a subreport embedded in it. It is linked on the Location ID from the main report = location ID from the subreport. However, there are situations in which there are no records returned for the subreport because there is no subreport data for that location ID. HOWEVER, I still need to count the fields as having a value of 0 because I am summing up this field in a grand total. For example, there is data for location 1 inĀ  field A and the value = 10. There is no data for location 2 for the subreport so the field A value is empty (not sure if this counts as NULL or not). If I wanted to total the field in the report footer, I get blanks. I assume this is because you cannot add a null value to anything without getting null.

Does anyone have any experience with this? I imagine I have to determine whether the data set will return records before it sets up the field formulas but I've never worked with BeforeReadingRecords. Is this the way to go?


Thanks,
D. Bodell
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