Master report design for linked reports
If the master report links to the sub reports, each sub-report is maintained in its own file.
To create a master report design:
- Create a new empty report design document (4rp).
- Select the master report data source as the data schema.
Detected sub report calls are shown in the report designer. They appear as nodes in the Data view, triggers in the Report Structure view, and images in the Document view.
- For each sub report, double-click on the image in the Document view and select a
report design that matches the sub report schema.Note: You can also edit the report design using the URL property of the sub report node.
An example can be seen in the Reports demo: MasterReport.4rp.
The Data View
In the data view, the invocation of the sub report is displayed at its position in the application source. While the execution of the sub report requires three invocations ( START REPORT, OUTPUT TO REPORT and FINISH REPORT), only the location of the START REPORT item is shown in the data view.
The Report Structure view
A sub report trigger is created in the document report structure. Select the sub report trigger to see the URL property, which the determines the report design of the sub report.
Document view (Central Work Area)
Sub reports display as images in the document view in the Central Work Area. Double-click the image to open the design file for editing.
Runtime behavior
At runtime, the reports are combined. The sub report is inserted into the master report.
The behavior at the insertion point follows the same rules that generally apply to nested containers. The master report needs to be designed with awareness of the configuration of the root container of the sub report. For example, if the sub report occupies all the space it can get (the height and width of the Mini Page both set to max), the master report must be prepared to handle that. In particular, the use of ancestors other than Mini Page should be avoided, since they will become overfull if the sub report requires more than one page of space.