Totals based on a calculated query field

SandyUK

New member
Local time
Today, 15:18
Joined
Apr 6, 2005
Messages
7
I am trying to display a series of totals in a report footer which are made up of calculated fields in a query

DtMinBreak: IIf([Reason]="Break",[DownTimeMins],"")

The query runs correctly and when I view it the relevant data is there for each row.

Therefore I thought it would be a simple matter of summing each column and displaying the result at the end of a report.

=Sum([qryProductionDetails]![DtMinBreak])

I have put this formula in a text box in the report footer and then repeated the process for each of the [Reason] entries. Ending up with 10 labelled text boxes which I thought would calculate the total [DownTimeMins] for each [Reason] however what actually happens is that [DownTimeMins] for the first entry in my data set that makes up the report is returned in the appropriate text box but that’s it!

I am banging my head against a brick wall can anybody help?

Regards

Adrian
 
In the Report Footer under the controls that you want to Sum, Place a Control, as its' Recordsourse put =Sum([DownTimeMins])

Hope this helps
 
Thanks for the advice not 100% sure what you meant but i think thats because my original post may not have been very clear. I have attached an example of what i have done so far. What i am trying to achieve is the Total downtime minutes for each of the different reasons for downtime when you run the report rptProductionDetails1 which i thought would be

=Sum([qryProductionDetails]![DtMinBreak]) etc etc

but this isnt working.

Any advice would be appreciated

Regards

Adrian
 

Attachments

Since the Report is bound to the query, just use

=Sum([DtMinBreak])
 
Thats one of things that i had tried but when you do that you get an error
(attached)
 

Attachments

Users who are viewing this thread

Back
Top Bottom