You are passing the value from a subreport back to the main report, and
showing it in the group footer. Then at the end of the report, you want the
sum of all the subreport totals?
Without testing it, you should be able to do it with Running Sum.
In the group footer, you already have a text box with properties like this:
Name txtSubTotal
Format Currency
Control Source =IIf([MySub].[Report].[HasData],
Nz([MySub].[Report].[MyTotal], 0), 0)
Now add another text box with these properties:
Name txtSubTotalRS
Format Currency
Control Source =[txtSubTotal]
Running Sum Over All
This text box should progressively increment each time the subreport
subtotal shows up, and you should then have the total by the time you reach
the end of the report.
Post back if that does not work for you.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
NoChrono said:
I think I have a similar problem, but I'm a bit more of a layman. I have a
subreport that has values listed in detail and then a group footer total
that
is related to the main report's grouping. I would like to create a total
in
the main report that has the subreport's total and the main report's total
in
the group footer. Please help me!
Allen Browne said:
The subreport has a HasData property.
Set the Control Source of the text box on the main form so eomthing like
this:
=IIf([MySub].[Report].[HasData], Nz([MySub].[Report].[MyTotal], 0), 0)
Replace "MySub" with the name of your subreport control, and "MyTotal"
with
the name of the text box in the subreport.