View Full Version : Totalling the results of a calculated field


Robert C
07-11-2006, 12:23 PM
I have a report on which I list projects worked on in any given month and the time spent working on them. The total time spent for the month is a summed total created in the query which forms the control source of the report.

On the report I then have a calculated field within the ProjectName header which tells me how much has been earned on each project - =([SumOfAccruedTime]/3600)*[RateChargable] and is shown in an unbound text box called [Text30]

What I want to show is the total earned on all projects within any particular month, bearing in mind that each project can have a different hourly rate.

I have tried simply inserting and unbound text box with a control of =Sum([Text30]), but this always returns an #Error.

I know this is a familiar topic and I have searched earlier posts, but with no success.

Any help would be gratefully received.

Cheers

Rob

edtab
07-11-2006, 07:03 PM
It appears that you are placing your total in the page footer. Try putting you textbox with the formula in it in the report footer; it should work there.

Robert C
07-11-2006, 11:34 PM
Hi edtab

Thanks for the reply. NO, I still get the error when the formula goes in the report footer.

Any other ideas?

Rob

Rich
07-12-2006, 12:12 AM
Repeat the calculation
ie =Sum(([SumOfAccruedTime]/3600)*[RateChargable]) or use the RunningSum property of an unbound textbox

Robert C
07-12-2006, 02:38 AM
Thank you Rich

Repeating the calculation works a treat - why on earth I didn't think of that beats me.

Must have something to do with a distinct lack of inate brilliance.

Thanks again.

Rob