troubleshooting Question

How to display "0.00" when field is null

Avatar of gemontes
gemontes asked on
Crystal ReportsSQL
23 Comments10 Solutions886 ViewsLast Modified:
I have a Crystal report in my organization that I'm trying to modify but I'm not getting it right.  This report gives us a "YTD Budget" total.  For some accounts that this pulls information from there is no budget and so I want the report to "display" a "0.00" however it just displays "blank".  I have tried to edit the field and it isn't suppressing zeros so that is not the issue.  The main report that shows this field is pulling from a sub-reports.  I'll paste the formulas below.  I am not sure how to make this field "display" 0.00 when there is no value in the database instead it just shows a blank that is not what i want.  The formulas for this field from the two subreports are below, can someone help please...

This formula is just basically setting up the data so that it pulls for month 01 to add the debit and credit fields for month 02 to do the same etc... As you see i am telling it if is null then 0 however it just displays a blank.  that is not what i want.

if isnull ({FBDETAIL.ACCOUNT}) then 0 else
if {?Pm-@CurrentMonth} = 01 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01}else
if {?Pm-@CurrentMonth} = 02 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01} +
if {?Pm-@CurrentMonth} = 03 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01} +
if {?Pm-@CurrentMonth}= 04 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01} +
if {?Pm-@CurrentMonth}= 05 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01} +
if {?Pm-@CurrentMonth}= 06 then {FBDETAIL.DB_AMOUNT_01}+{FBDETAIL.CR_AMOUNT_01} +

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 10 Answers and 23 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 10 Answers and 23 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros