Sub reports

You can include one or more reports inside another report.

With sub reports, you can maximize the reuse of reports in the Genero BDL application, reuse report designs, and break apart complex designs into smaller reusable parts.

Note: Alternatively, you can use report transformations to duplicate data. See Report schema transformations and Options for data operations in reports.

Developing sub reports

Implementing a sub report requires you to work with both the Genero application source code and the Genero report design documents.

In the BDL code, a sub report call is detected when a START REPORT instruction is found within another report's REPORT block. The report containing the START REPORT instruction is the master report. The called report is the sub report.

In the report design document, the selected data schema includes sub report triggers.

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 MiniPage both set to max), the master report must be prepared to handle that. In particular, the use of ancestors other than MiniPage should be avoided, since they will become overfull if the sub report requires more than one page of space.