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

How do you total a column of formulas?

Status
Not open for further replies.

sprog

IS-IT--Management
Sep 12, 2002
48
NZ
I have a report that shows lieu days owing, average hourly rate and average hours per day. My last formula is the total value of days owing (eg days x average hours per day x average hourly rate).

I want to put a sub total at the end of each group. I would normaly insert "sum", but because the column is formulas, it won't let me do this.

Any help much appreciated.

 
Do you mean you currently have summaries for an inner group, e.g., Group #2, and you want to total them at a higher order group, e.g., Group #1? You can use variables to do this. Create three formulas:

//{@reset} to be placed in GH#1 and suppressed:
whileprintingrecords;
numbervar tot;
if not inrepeatedgroupheader then
tot := 0;

//{@accum} to be placed (and suppressed) in the group #2 section where the values you want to sum are located:
whileprintingrecords;
numbervar tot := tot + {@totalvalueofdaysowing};

//{@display} to be placed in GF#1:
whileprintingrecords;
numbervar tot;

If you want to summarize other formulas, add new variables to the reset and accum formulas, and then add one display formula for each variable.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top