Note: The instructions below are for inserting an subreport on a custom report in the Report Writer module.
On the Edit Report screen, click the Subreport button, or select the Insert menu and then Subreport.
Note: If the report to edit is not yet open, first complete the following: from the Report Writer screen, click on the name of the view group in the Report Groups List that contains the report for which to add a subreport and click on the name of the report to edit in the Reports List (or click the Find button instead to search for the desired report); then click the Edit Record button located at the top of the screen.
Click at the location within the desired section on the report for where to add the subreport, and drag and drop to the desired size.
At the Subreport Name Search screen, select the report to insert as a subreport by double-clicking on the desired report.
Complete the Subreport Properties screen as follows:
The name of the selected report to insert as the subreport will appear in the Subreport Name field. If needed, click the Search button to select a different report.
In the list on the left side of the screen, select the field within the report group (query or view group) for the main report on which to link the subreport to the main report. First, select the file that contains the field to link by clicking once on the box (plus sign) in front of the file name or double-clicking on the file name and then click on the desired field.
In the list on the right side of the screen, select the field within the report group (query or view group) for the subreport on which to link the subreport to the main report. First, select the file that contains the field to link by clicking once on the box (plus sign) in front of the file name or double-clicking on the file name and then click on the desired field.
Click the <- Create Link -> button to link the field from the main report to the field from the subreport.
Note: The fields selected to link must be the same type. Typically, primary key fields (such as the VendorKey or EmployeeKey fields) are used to link the main report and the subreport.
Repeat this step to link the subreport to the main report on multiple fields, if needed.
Click the Save button.
Note: If inserting a subreport in the Report Header or Report Footer section, the subreport cannot be linked on specific fields and so just click the Save button on the Subreport Properties screen.
The subreport will appear in the designated section as an object with the subreport name.
Resize, format, move, and align the subreport as needed.
Tip: The following buttons (and corresponding options under the Format menu) are available to format a subreport: Border button. Additional properties can be set for a subreport using the following fields within the Properties List: Can Grow (True or False), Can Shrink (True or False), and Optional (True or False).
Click the Save button.