Two unrelated subreports and totals

  • Thread starter Thread starter Steve P
  • Start date Start date
S

Steve P

I'm trying to create a report that contains two unrelated
subreports and which calculates totals based on the
subreports. One report is donations from people, the
other donations from organizations. Donations in both
subreports are sorted by year and by account within each
year. I want the main report to show, for each year and
for each account, the amount from people, the amount from
organizations, and the total amount (people plus
organizations).

How do I do this? Specifically, how do I set up grouping
and sorting across two subreports and the associated
totals (in the main report) to keep the rows in sync? And
how do I handle no data for a given account and year?

I can email an example if needed.

Thanks for any input!
 
Steve

Create a report that does the "people" part. Create a report that does the
Org part. On each include a totals control (where the source is =
Sum([YourAmtField]) in a report footer. These won't show on the main
report.

Those are your subreports -- drag/insert them into a new, blank report in
design mode. Create three new controls on the main report. One has a
source =
Reports!YourMainReportName!YourSubreportControlName!Report!YourTotalsControl
InThatSubreportName ... repeat for the second. (aircode -- actual syntax
may vary)

The third new control is the addition of both.

Heads up! Nulls propagate -- if any values are null, the calculations based
on them will be. Consider using the Nz() function to set nulls = 0.

Good luck!

Jeff Boyce
<Access MVP>
 
Back
Top