Working with Sub Report
A Sub-report is a report that is within another report, main-report. A single main-report can consist of multiple sub-report.
A same sub-report can be shared used across any number of main-reports. Data from the sub-report is used in the main report.
Report is added as a sub-report using Sub-Report Component and placed within main-report's layout.
The datasource for sub-report is required to be added to the main-report for accessing.
Sample available at the following directory :-
SubReport
File System:KnowledgeBase
How does the sub-report gets it data
When a sub-report is rendered, it will look for datasources in the following order:
- A datasource name defined at the master report template -> subreport component
- A datasource name defined in the sub report template
when a name has been found, it will then get the datasource file in the following order:
- A datasource with matching name defined in the master report template
- A datasource with matching name defined in the sub report template