Thread: Sub Reports
View Single Post
  #2  
Old November 25th, 2005, 09:00 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default Sub Reports

Don wrote:

Is it possible to calculate a total in a main report from data that is in an
attached sub report? If it is, can you point me to some examples so that I
can understand the syntax?



The subreport must calculate its own total in it report
footer section.

A main report text box (named txtRunTotal) in the same
section as the subreport can refer to the subreport total by
using an expression like:
=IIf(subreport,Report.HasData, subreport,Report.total, 0)
and set the its RunningSum property to Over All

To display the grand total in the main report's footer
section, use a text box with the expression:
=txtRunTotal

--
Marsh
MVP [MS Access]