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

sum of a running total field

Status
Not open for further replies.

cc5305

MIS
Oct 4, 2000
70
US
I have running total formula field. But I need to add up the field's number for each record. I tried creating a formula for it, but Seagate won't let me sum up a running total field. How can I sum up this field?
 
A running total can be reset by record or groups or never.
You can use the same running total multiple times but change the 'Reset' radio button options to tell it when to restart.
 
I'm sorry, I meant I need to sum up the running total field . But since that running total field is a formula and I can't sum up a formula field at all! Sorry for the unclear question before.
 
I was able to "fake" a total of running totals by creating a suppressed field in my group footer that kept a "running total total." I then created a formula to display that total and placed it in the report footer. hope this can help!
 
c5305,

The answer depends on how you created your running total. Please post the actual running total formula in your next post. Then tell us:

What version of CR are you using?
Where is the field currently placed on the report?
How do you want it totaled.

Ken Hamady-
 
I don't even know what the formulas are since the report was created by someone else and I'm fairly novice about Crystal report, so I can't really figured out those formulas. But I did get some help from Seagate's Tech Help and they suggested a three formula approach. Below are the sample formulas that they gave me.

//goes in group header for dept, resets count to zero
WhilePrintingRecords ;
NumberVar DeptEmpCount := 0

//goes in the detail section, increments employee count
WhilePrintingRecords ;
NumberVar DeptEmpCount := DeptEmpCount + 1

//goes in the group footer for dept, shows dept emp count
WhilePrintingRecords ;
NumberVar DeptEmpCount

Thanks a lot for your help guys.
 
If you create another set like this one, but don't add a reset formula (the one that assigns to 0 each group header) you will get a grand total that equals the sum of the visible subtotals.

Skip the first formula, you don't want a reset.

New second formula is the similar, but use a different variable name.

Third formula goes in Report footer. Use variable name to match the new second formula. Ken Hamady
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top