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!

Help in finding Avg

Status
Not open for further replies.

abc567

Programmer
Jul 8, 2009
45
US
I have a grouping report in which average per month is needed to calculate.

The report is based on grouping.

Grouping is done on date field on monthly basis.

%Survey time=
Sum({RCT_RPTG_RC100.SURVEYTIMETOTAL},{RCT_RPTG_RC100.ENDDATE}, monthly")
%
Sum({RCT_RPTG_RC100.TOTTIMETOTAL},{RCT_RPTG_RC100.ENDDATE}, "monthly")


%survey time

(Group 1)- 200901 - 35.23%
(Group 2)- 200902 - 52.13%
(Group 3)- 200903 - 12.25%

Average Per--------> ? ? ?
Month


As "insert summary" is not considering this formula, please let me know the way to solve this problem.

i.e., in other words i need a way to find the average of a summary(which is calculated by formula mentioned above).

Thanks

 
Create a formula like this and place it in the group section and suppress it:

whileprintingrecords;
numbervar summo := summo + {@SurveyTime};
numbervar cnt := cnt + 1;

Then in the report footer, use:

whileprintingrecords;
numbervar summo;
numbervar cnt;
summo/cnt

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top