Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print a '0' in Count if no records returned 1

Status
Not open for further replies.

JBourne77

IS-IT--Management
Jan 21, 2008
153
US
I am confused, thus this post. I am doing a count on a field and there are some that will have zero as a count. I set my count to show the value as a "0" but its just printing blanks. Any help is appreciated.

Right Click >> Format Field > "Custom Style" > "Show Zero Value as:" = 0
 
Try replacing the summary with a formula:

if isnull(count({table.field})) then 0 else
count({table.field})

-LB
 
lbass,

I tried:

Code:
if isnull(count({aaVisitStatus;1.TicketNumber})) then 0 else
count({aaVisitStatus;1.TicketNumber})

and I get back a sum of all my Bill Status codes versus a count per bill status code - ({aaVisitStatus;1.code}). I think I need to tweak this some.
 
Check you haven't set the Report Option for "Convert Database NULL values to default" or "Convert other NULL values to default"

These are specific to each report and you can set them via File/Report Options

Editor and Publisher of Crystal Clear
 
You need to add the group condition--didn't know you had one:

if isnull(count({aaVisitStatus;1.TicketNumber},{aaVisitStatus;1.code})) then 0 else
count({aaVisitStatus;1.TicketNumber},{aaVisitStatus;1.code})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top