Skip to Content
0

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

Aug 15, 2017 at 02:23 AM

28

avatar image
Former Member

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Ian Waterman Aug 15, 2017 at 09:01 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 16, 2017 at 01:06 AM
0

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.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
avatar image
Former Member Aug 16, 2017 at 08:13 AM
0

Hi Ian,

I got it. Thanks!

Share
10 |10000 characters needed characters left characters exceeded