Subreports

You can build subreports into the top level of a report or put them in separate .rptdesign files.

For example, a report might show purchase order headers. For each header, a report can show line items for that particular purchase order. In this case, the purchase order line items are shown as a subreport of the purchase order header data.

You can build subreports into the .rptdesign file as the main report. A single report might show fiscal years and fiscal quarters, where fiscal years are the parent records and the report displays the fiscal quarters for each fiscal year.

Use the following guidelines for single reports:

  • A record ID is returned for each result of a parent data set.
  • The child IBM TRIRIGA query filters results based on the parent record.
  • The child data set takes a parent ID as a parameter. If BIRT sends a system_parentRecordId with a default value of 0, the IBM TRIRIGA system ignores it.
  • In the report layout's child table, the data set parameter binding binds the parent record's ID to the child data set's input parameter.

You can build subreports into different .rptdesign files. For example, you can show all fiscal years in a single list that uses a hyperlink to take the user to the quarters for the selected year. In this case, the fiscal quarters is a separate .rptdesign file.

Use the following guidelines for separate report files:

  • At the top level of any compressed file that you import into IBM TRIRIGA, there must be at least one .rptdesign file. Any subreports in other .rptdesign files must be in a child directory.
  • When you configure a hyperlink, the system__recordId from the top-level report must be bound to the system__parentRecordId report parameter of the subreport. An example of this includes fiscal years and fiscal quarters.