Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Addition in Crystal Report 8.5 1

Status
Not open for further replies.

CrystalProcessor

Programmer
Apr 18, 2013
6
0
0
US
I'm struggling with what seems to be a simple problem. I want to

1) add fields A + B + C + D + E + F and display them as @G. I am using this in my formula {A} + {B} + . . . + {F}. It returns zero even when the fields have values. The SQL data type is money.

2) after that, I would like to sum the variable for grouping. I plan to do it this way SUM(@G, GroupName). What would you all recommend?

Thanks!
 
It could be that one of the fields is null and that's messing up the whole formula.

Go to Report Options ( under File) and check "Convert Database Null Values to Default" (it may be somewhat different, I'm not looking at 8.5)

If that doesn't work try this in your formula:

(if isnull({a} then 0 else {a)) + (if isnull({b}) then 0 else {b}) + . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top