mbroad02
asked on
Crystal Reports-How to display nulls as zero
Here's another one for the Crystal gurus. I am not really familiar with using formulas on the "Format field" page. I have the following issue:
I am performing a summary on a detail record amount field , displaying the summary field on the report. For some reason, if there are no detail records or the amount fields are null, the summary shows up on the report as blanks (or null?). I have the selector set to "show zero value as 0." However, i don't know how to get it to show a blank or null value as zero (which is a requirement.
help! thanks
I am performing a summary on a detail record amount field , displaying the summary field on the report. For some reason, if there are no detail records or the amount fields are null, the summary shows up on the report as blanks (or null?). I have the selector set to "show zero value as 0." However, i don't know how to get it to show a blank or null value as zero (which is a requirement.
help! thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I appreciate your suggestions. However when I use the formula:
Global currencyVar AMT_TOT;if (isnull(AMT_TOT)) then0elseAMT_TOT;
I get an error saying "A field is required here" for the AMT_TOT right after the isnull.
What am I doing wrong?
Global currencyVar AMT_TOT;if (isnull(AMT_TOT)) then0elseAMT_TOT;
I get an error saying "A field is required here" for the AMT_TOT right after the isnull.
What am I doing wrong?
A variable cannot be NULL, you can only test database fields with IsNull.
mlmcc
mlmcc
go to report options in the file menu and check the 'set database values to default'
if (isnull({yourNumberField})
0
else
{youNumberField}