Show Total In Subreport On Main Report

  • Thread starter Thread starter Marie
  • Start date Start date
M

Marie

How do you display a total from a subreport on the main report. If it makes
a difference, the total is a total of a calculated field (Qty * Price). Does
the total on the subreport go in the pagefooter or report footer? Say the
total is shown in a texrbox named MyTotal and the subreport control is named
MySubreportControl, what exactly do I put in the control source of a textbox
on the main report to show the total?

Thanks For All Help!

Marie
 
Marie,
Your total control in the subreport should be in the report footer. You can
reference it in your main report with syntax like:
=MySubReportControl.Report!MyTotal
If you expect that the subreport may not return records, you can use:
=IIf(MySubReportControl.Report.HasData, MySubReportControl.Report!MyTotal,
0)

Congrats on asking a clear question. It's nice getting some good information
on your needs and conditions.
 
Back
Top