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

How to sum values together in custom field 1

Status
Not open for further replies.

ker0k3n0

Technical User
Apr 19, 2010
18
US
Hello,
I have created a formula to show a static goal value based on each group in the report (if group1 = 1, my goal display as 10; if group1 = 2, my goal display as 20). I want to sum up the goal values at the reporting footer. I use the summary function and my value = 181060 which was incorrect.
The goal total should be 10+20+400+200+50+60+70+80+90+100+110+120 = 1310.
How do i do that?

select {@Group1}
case 1: 10
case 2: 20
case 3: 400
case 4: 200
case 5: 50
case 6: 60
case 7: 70
case 8: 80
case 9: 90
case 10: 100
case 11: 110
case 12: 120
default : 1
 
If you are displaying the above formula in a group section, change it:

whileprintingrecords;
numbervar grpgoal;
numbervar totgoal;
grpgoal := (
select {@Group1}
case 1: 10
case 2: 20
case 3: 400
case 4: 200
case 5: 50
case 6: 60
case 7: 70
case 8: 80
case 9: 90
case 10: 100
case 11: 110
case 12: 120
default : 1
);
totgoal := totgoal + grpgoal;
grpgoal

Then in the report footer use:

whileprintingrecords;
numbervar totgoal;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top