Trying to total sub report totals

Stuart Green

Registered User.
Local time
Today, 14:43
Joined
Jun 24, 2002
Messages
108
My report has a group header on it (ot_seq) within which is a sub report called "rpt_ot_timeandpager". This sub report gives a sum value called [sumofmoney] and I can get this to appear within my group header OK using the following in an unbound control called "reptotal".

="Total amount for claim " & [ot_seq] & " = " & [Report]![pt_ot_timeandpager]![sumofmoney]

What I want to do is sum all of the sub report totals and show it in the report footer but I am failing miserably at this. I have tried

=sum([Report]![pt_ot_timeandpager]![sumofmoney]) or
=sum([reptotal])

but each time the reference is unrecognised. Can this be done please or have I come to the well once too often?

Many thanks
 
Thanks for the prompt reply Rich, I did see this one when trawling through but it doesn't address my problem. I have sort of got an answer by calculating a running total as follows (where grandtotal is my subreport total)

Option Compare Database
Dim mdblBalance As Double

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
mdblBalance = mdblBalance + grandtotal
txtBalance = mdblBalance
End Sub

Private Sub Report_Open(Cancel As Integer)
mdblBalance = 0

End Sub

This works fine and gives the right answer on print preview but when I actually print it then the figures differ to those on screen
 

Users who are viewing this thread

Back
Top Bottom