In Chapter 3, you created a very simple single data row sub-report that included details about the current customer for invoicing purposes. In this chapter, you'll review other scenarios for using sub-reports and learn the technical details involved in including sub-reports in a master report.
Sub-reports in Pentaho Reporting may be included in any band of a report, except for the page header and page footer bands. Sub-reports receive a DataRow
of parameters, determined by the current state of their parent report when rendering the sub-report. These parameters may be used when executing a sub-report query or referenced directly in the sub-report. Within sub-reports, you define named queries that may reference the DataRow
of parameters passed in, allowing a sub-report to query only the currently scoped data, not the entire data set available to the parent report.
Sub-reports may be of any length, may be included in other sub-reports in a nested fashion, and may also be...