What are sub reports?

Sub reports allow one report to be called from another.

Sub reports allow reuse of BDL code in the report application and reuse of available report designs. Sub reports can be used to break complex designs into smaller reusable parts.

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

Runtime behavior

At runtime, the reports are combined. The sub report is inserted in 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.