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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totalling Rows (3 fields on same row) 1

Status
Not open for further replies.

catkid

MIS
Jan 17, 2005
2
US
Hello,
I have a crystal report that contain 3 fields I want to add together to get the line total. If any field is blank or null, I do not get a total. This is what I get:

F1 F2 F3 Row Total
48 24 12 84
10 8
12 1

This is what I want:

F1 F2 F3 Row Total
48 24 12 84
10 8 18
12 1 13

The formular for my Row Total is: F1+F2+F3
I have used in each field: If IsNull ({f1}) then {F1} =0 else {F1} = {F1}. I used the same formular in the other fields but it does not work. Please help.
 
For each field, use a formula like {@field1}:

if isnull({table.field1}) then 0 else {table.field1}

Then add together your formulas:

{@field1}+{@field2}+{@field3}

-LB
 
Thanks Ibass. I was working with this all weekend you are a life saver. Thanks again and have a nice day. [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top