Sub Report Tips and Tricks

Print
Category: Reports Reports
Last Updated: 13 September 2020 13 September 2020

Subreports are great for showing data from a related table. This works just like a subform, by setting the master/child linking fields.

What else can you use a subreport to print?

Other data that is not related to a specific record in the parent report. The trick is to not set the master/child linking fields. This allows you to print information in the report header or footer that is not "link" to a record.

 

Subreports are great for summarizing the data in a report.

By basing a sub report's record source on the same record source as the parent report, you can show all the totals for each grouping (hiding the detail). You can also create a  totaling query based on the parent report's record source (query)

 

What if you want to place the report's total in the report header?

Use a subreport that calculates and displays just the total.   

 

How do you print several different statistics that are calculated with different queries?

Use subreports. It is possible to have a parent report that has no record source, only subreports.

 

How to print a header on each page when a subreport spans multiple pages?

The page header section does not print for a report when it is used as a subreport. You have to use a group header section and the "Repeat Section" property.

Steps:

1. Open the report to be used as a subreport in the design view.
2. Open the Sorting and Grouping box.
3. In the Field column of the dialog, enter an expression that won't change, e.g.: =0 and set Group Header to Yes.
4. Right-click the new group header (grey bar on the report), and choose Properties. Set Repeat Section to Yes.

This gives you a group header that appears at the top of the subreport. It will repeat on each new page like the way you would expect the page header for the subreport.