By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Pass Running-sum Group Total from Sub Report to Main Report

P: n/a
Hi,

I've got an access report which contains a sub-report. The sub-report
contains various items in a group Footer which culminates in a running sum
text box called txtGrandTotal. I want to use this 'total' in the main
report so I have a text box with the following:-

=([Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal])

For some reason, which I'm sure is perfectly obvious but I'm buggered if I
can think why, the above doesn't actually show the grand total. Instead it
shows the value of the first record in the sub-report's group footer. I.e.

txtGrandTotal in RPT_SubReport shows the CORRECT value

[Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal] shows
the INCORRECT value
What am I missing?!?

TIA,

Andy
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
A *running sum* text box in the subreport? Hmm. That's probably a timing
issue, i.e. at the time the main report reads the value from the subreport,
only the first record has been accessed.

Is there any chance of placing a text box in a group footer in the
subreport, and setting its ControlSource to:
=Sum([SomeField])
so that this box is dependent on all the others, and so Access can get the
total only after it is completed?

(You can set the Visible property of the text box or even the group footer
section to No if you don't want it shown.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Pecanfan" <pe******@no.spam> wrote in message
news:11***************@smtp-1.griffin.com...

I've got an access report which contains a sub-report. The sub-report
contains various items in a group Footer which culminates in a running sum
text box called txtGrandTotal. I want to use this 'total' in the main
report so I have a text box with the following:-

=([Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal])

For some reason, which I'm sure is perfectly obvious but I'm buggered if I
can think why, the above doesn't actually show the grand total. Instead
it
shows the value of the first record in the sub-report's group footer.
I.e.

txtGrandTotal in RPT_SubReport shows the CORRECT value

[Reports]![RPT_MainReport]![RPT_SubReport].[Report]![txtGrandTotal] shows
the INCORRECT value
What am I missing?!?

TIA,

Andy

Nov 13 '05 #2

P: n/a
> Is there any chance of placing a text box in a group footer in the
subreport, and setting its ControlSource to:
=Sum([SomeField])
so that this box is dependent on all the others, and so Access can get the
total only after it is completed?


Do you mean create *any* Sum field in the group footer - i.e.
=Sum([Anything]) ? If so I've already got a summing field in the group
footer (the whole shebang is in the group footer) - I don't have anything in
the Detail of the subreport at all - is that bad?

Cheers,

Andy
Nov 13 '05 #3

P: n/a
> > Is there any chance of placing a text box in a group footer in the
subreport, and setting its ControlSource to:
=Sum([SomeField])
so that this box is dependent on all the others, and so Access can get the total only after it is completed?
Do you mean create *any* Sum field in the group footer - i.e.
=Sum([Anything]) ? If so I've already got a summing field in the group
footer (the whole shebang is in the group footer) - I don't have anything

in the Detail of the subreport at all - is that bad?


Oh, Access... how I love it. Gave up and created another utterly pointless
subreport and copied all the 'summary' stuff I wanted in the main report
into this sub report - then inserted this subreport back into the main
report. That works!

Gah! :-)

Andy
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.