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!

Addition of summaries of group footers

Status
Not open for further replies.

abc567

Programmer
Jul 8, 2009
45
US
Hi,

I have a grouping report, its like
Group 1 Sum=10
Group 2 Sum=20
Group 3 Sum=30
..

I want to get average of those sum values and it should be (10+20+30)/3=20



 
How did you get the original sum? If they are simple sums of detail level data, you could use this formula, but not sure without more information:

sum({table.value})/distinctcount({table.groupfield})

-LB
 
No,

I have a field "Average survey time" whose formula is
"Total survey time/number of work orders"

This is calculated once per group.
Group 200101 - 2.25
Group 200102 - 3
Group 200103 - 5
....

I want to add these avg survey time as 2.25+2+5=9.25

I tried using running total but running total doesnt show my formula, it seems running total cannot be done on that formula.

Hope it answers your doubt
 
I guess i have to put the same formula in the section where i want to print that average...
 
Your initial post was misleading then. Now you only want to sum the averages? Not average them? Let's assume you want the average of the averages. Create a formula like this and place it in the group section:

whileprintingrecords;
numbervar sumave := sumave + {@youraverageformula};
numbervar cnt := cnt + 1;

Then in the report footer, use a formula like this to calculate the average:

whileprintingrecords;
numbervar sumave;
numbervar cnt;
sumave/cnt

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top