Print Page | Close Window

How to print a Count of zero when no records?

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20191
Printed Date: 10 Apr 2025 at 2:24pm


Topic: How to print a Count of zero when no records?
Posted By: brooksr
Subject: How to print a Count of zero when no records?
Date Posted: 05 Nov 2013 at 2:26am
I have a subreport with a report footer and a field to print the count of records in the subreport.  It works fine if there are 1+ records, but if there are zero records, the field is blank.  I'd like it to show zero. 
 
In the Format Editor for the field, Number tab, I've tried:
 
1. Style = -1,123
 
2. Style = Custom Style, then Suppress if Zero = unchecked, Show Zero Values as = 0.
 
Any help appreciated.
 
Thx,
 
Brooks



Replies:
Posted By: lockwelle
Date Posted: 07 Nov 2013 at 9:03am
you could have a object that has 0 in it, and if the count of records is > 0 to suppress it and show the 'true' count.

Basically have 2 objects and only display 1 at a time based on the count.

HTH


Posted By: brooksr
Date Posted: 07 Nov 2013 at 10:04am
Hi lockwelle,
 
Thanks for the post and idea.  I was looking for a solution within the field but this would be a workaround.
 
Brooks



Print Page | Close Window