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

Report Calculation

Status
Not open for further replies.

Apache65

Technical User
Jan 30, 2006
16
Is there a way to calculate a value from another calculated value on the same report? What I'm trying to accomplish is a report footer average calculated from a detail footer average. Below is the report detail screen.

Report Header
Report Title
---------------------------------------------------------
Page Header
Pname WoundID Healing Rate
---------------------------------------------------------
Wound_Doc Header
[Wound_Doc]
---------------------------------------------------------
Lname Header
=[LName] & ", " & [fname]
---------------------------------------------------------
WoundID Header
[WoundID]
---------------------------------------------------------
Detail
[HealingRate]
---------------------------------------------------------
LName Footer
=Avg([HealingRate])
---------------------------------------------------------
Wound_Doc Footer
=Avg([HealingRate])
---------------------------------------------------------
Page Footer
[=Now()]
----------------------------------------------------------
Report Footer
=Avg([HealingRate])
----------------------------------------------------------

I want my "Report Footer" value to be an average of "Wound_Doc Footer" but it's actually an average of all the "Detail" values on the report. Any ideas??? Thanks.....................
 
The value you are is probably the correct average since it is weighted. If you want to Avg() an Avg() you will need to sum the averages from the group footer and then divide by the number of groups. I believe this can be done with running sums on two different text boxes in the Wound_Doc Footer. One would be on the average and the other on a text box with a control source of =1.

Then in the report footer, try a text box with a control source of:
Code:
=txtRunSumWoundDocAvg/txtRunSumWoundDoc1

Duane
Hook'D on Access
MS Access MVP
 
Thanks for the reply dhookom, I'll give it a try........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top