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!

summing calculated fields

Status
Not open for further replies.

tomwacocpa

Technical User
Jul 14, 2004
2
US
How to "total", "sub-total" calculated fields?
 
Try doing a running total for the subtotal in the group header and then try getting the grand total by doing the same running total and putting it in the group footer. This should get you a subtotal and a grand total.
 
Nothing prevents you from subtotaling/totaling a calculated field, if what you mean to say is a formula. Read up on using variables, or if the formula always returns a value, then you can drop it into the details and use the standard aggregate functions.

Using real terms will help to provide the best solution, as will:

Crystal version
Database/connectivity used
Example data
Expected output

Please post specifics.

-k
 
The Running Total solution offered is incorrect, as I stated, please post specifics.

-k
 
Synapsevampire:
CR Ver:9
CR to Peachtree (Btrieve)
A D F G
179413.00 .3263 .1756 9987.06 group footer
413170.00 .3306 .2299 31407.27 "
--------- ----- ----- --------
592587.00 .3263 .2135 41282.60 report footer
abs. val. calc calc calc
A*D*F
correct total of G=41390.33; need total not calc amt.
can't "sum(function)" G; also, "summary", RT not available or do not work.
Thanks, tomwacocpa
 
Create two formulas:

//{@sumtot} to be placed in the group footer:
whileprintingrecords;
numbervar sumtot := sumtot + sum({@G},{table.groupfield});

//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar sumtot;

Substitute your formula name for G and the correct group field in the first formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top