cancel
Showing results for 
Search instead for 
Did you mean: 

When Currency Sumup, one value is 0, the sum up value is blank.

Former Member
0 Kudos

Hi All,

I have a report with some formula to sum up a few formula value for example below.

{@TotalCharge}+{@Profit&Markup}

({@Profit}/{@TotalRev})*100

Noticed when one of the value is blank or 0 then my return value will be blank.

Both data type is currency.

Can anyone advise why is this so?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

You need to either modify your formula to test for nulls

Eg

If isnull({valueField} then 0 else ......whatever your formula does.

Or in File-> options check set database nulls to default. This is a bit more risky as it may have repercussions with other parts of your report.

Ian

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ian,

I got it. Thanks!

Former Member
0 Kudos

Hi Ian, ,

let said for {@TotalCharge}+{@Profit&Markup}, which mean I must check both {@TotalCharge} and {@Profit&Markup} if it is 0?

If {CR073_ISSUES.CR073_AMT_03} = 0 then {@ShareNonBillCharge}
else if {@ShareNonBillCharge} = 0 then {CR073_ISSUES.CR073_AMT_03}
else {CR073_ISSUES.CR073_AMT_03}-{@ShareNonBillCharge}

Is this correct? But I still get the same result.

Former Member
0 Kudos

You need to test for nulls

If isnull({CR073_ISSUES.CR073_AMT_03}) or {CR073_ISSUES.CR073_AMT_03} = 0

then {@ShareNonBillCharge}......

repeat for rest of formula and also test for nulls in @ShareNonBillCharge in same way.

Ian