Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Crystal Reports-How to display nulls as zero

Posted on 2009-05-01
5
Medium Priority
?
1,047 Views
Last Modified: 2013-11-15
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
0
Comment
Question by:mbroad02
5 Comments
 
LVL 1

Expert Comment

by:by6738
ID: 24280381
You can display null values as zero by implementing the following formula:

if (isnull({yourNumberField})) then
0
else
{youNumberField}
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 24280439
If you mean the summary field, I don't think you can.  You can however use the formula above and then summarize that one and get the 0 to display.

mlmcc
0
 

Author Comment

by:mbroad02
ID: 24280627
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?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24280729
A variable cannot be NULL, you can only test database fields with IsNull.

mlmcc
0
 

Expert Comment

by:ColB7533
ID: 24282625
go to report options in the file menu and check the 'set database values to default'
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question