A sub-report is simply a report composed of its own JRXML source and compiled in a Jasper file. Creating a sub-report is very similar to creating any other report. The margins of a sub-report are usually set to zero for sub-reports because a sub-report is meant to be a portion of a page, not an entire document. The horizontal dimension of the sub-report should be as large as the element into which it is placed in the parent report.
There are three steps to creating and adding a sub-report:
• Create a report – Create a parent or master report that will contain the sub-report.
• Create a sub-report – Create and compile a sub-report. Optionally create a dynamic connection to filter the records of the sub-report based on the parent’s data.
• Add the sub-report to the parent report – Insert a sub-report element and specify the following:
o The data adapter or data source for the sub-report.
o The location of the sub-reports compiled Jasper file.
o An optional parameters map (it can be empty) to set the report parameters used in the dynamic connection.
DataTerrain with years of experience and reliable experts is ready to assist. We have served more than 200 plus customers in the US and an additional 60 plus customers worldwide. We are flexible in working hours and do not need any long-term binding contracts.