Walkthrough: Embedding the Subreport

Walkthrough

This example continues from Walkthrough: Designing the Subreport. Now you will design the master report, and then embed the subreport in the master report.

1. Click the 'New' button in the Style Studio toolbar. This opens the 'New Asset' dialog box.

2. In the left panel, select the 'Report' node. In the right 'Types' panel, select 'Blank Tabular Report' and click 'OK'.

3. Expand the Style Studio Toolbox panel.

4. Click the 'Section' component in the Toolbox panel to open the 'Data Binding' dialog box for a new section.

5. Under the Data tab, bind the section to the 'sales by state' query from the 'Orders' data source.

6. Click 'Finish' to exit the 'Data Binding' dialog box.

7. Click the Section to select it. Drag the bottom border of the section downward to create more space within the content band.

8. Right-click the section, and select 'Insert' > 'Special Fields' > 'Subreport' from the context menu.

 

9. Click in the content band of the Section to embed the subreport.

 

10. Right-click the Subreport element and select 'Properties' from the context menu. This opens the 'Subreport Properties' dialog box.

11. Select the Subreport tab, and click the 'Browse' button in the 'Template' tab. Select the subreport you previously created, customer_subreport.srt.

 

(Note: To open the selected subreport for editing, click the 'Edit' button. Enable the 'Share Page Numbering' option to continue the subreport page numbering set by “{P}” and “{N}” header/footer tags across multiple instances of the rendered subreport. When this option is disabled, numbering restarts at each subreport occur­rence.)

12. Click the Links tab, and select 'State' in the 'Available Fields' drop-down list.

 

This associates the 'state' parameter of the subreport with the 'State' field of the main report. As a result, the subreport that appears within each band contains only the table rows correspond­ing to the 'State' value of that particular band.

13. Preview the report. The master report now displays a section with the subreport embedded in each band.

 

<< Walkthrough: Designing the Subreport © 1996-2013 InetSoft Technology Corporation (v11.4) 6.8 Calculating a New Query Field >>