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!

Report Calculation

Status
Not open for further replies.

JCMcAbee

Technical User
Nov 14, 2003
53
US
Hello. Access 2003. I hope this makes sense. I request assistance with the following calculation problem:

In a grouped(?) footer of the report I have the following calculations in text boxes, and they are working well:

Column1: =Sum([pays])
Column2: =Sum([fuel])
Column3: =Sum([osa])
Column4: =(Count([fit(i)])+Count([ag(i)])+Count([azg(i)])-Count([loc_id]))/4
Column5: =Sum([pays])+Sum([fuel])+Sum([osa])+(Count([fit(i)])+Count([ag(i)])+Count([azg(i)])-Count([loc_id]))/4

Column5 is the grand total of columns 1-4

In the report footer I have the following calculations going on, and they are working well:

Column1: =Sum(Abs([main Zone]=1)*([pays]))
Column2: =Sum(Abs([main Zone]=1)*([fuel]))
Column3: =Sum(Abs([main Zone]=1)*([osa]))
Column4: (blank)
Column5 (blank)

My problem is this: I would like Columns 4&5 of the grouped area to carry to Columns 4&5 of the report footer. I can get Columns 1-3 to carry to the report footer, but not Columns 4&5. Again, Column5 being the grand total for that zone.

Thanks in advance.
 
Does it not work properly if you just assign the same expression you used in the detail section to your text boxes?

Hope this helps,

Alex

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
Alex, thanks for the reply. No it does not. If I try to use it with =Sum(Abs... I get a 'Cannot aggregate..because, apparently I cannot combine the two Sum expressions in the same calc. My limited knowledge does know how to combine the two properly.
 
(This thread is a continuation of thread702-1400500)
 
I reposted in this forum, as suggested. Still looking for assistance. Thanks
 
Why not post the calculation you are trying?

[small]----signature below----[/small]
I don't do any programming whatsoever

Ignorance of certain subjects is a great part of wisdom
 
Thanks for the reply. What I am trying to accomplish is just combining two calculations into one. When I try to combine the expression in column5 of the grouped area with the expression in column1 of the report footer, it would look something like this:
=Sum(Abs([main Zone]=1)*=Sum([pays])+Sum([fuel])+Sum([osa])+(Count([fit(i)])+Count([ag(i)])+Count([azg(i)])-Count([loc_id]))/4

When I do that, I receive 'Cannot Have Aggregate Function'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top