Friday, 14 February 2020

No sub report elements data displayed in report when calling the sub report from parent report Title band in jaspersoft design studio

I'd a report having 15 sub reports. Out of these 15, some were having textual design and some of them needed to connect to database and display certain data using elements such as table component or an html-5 chart.

I'd started keeping/calling all the sub reports in parent reports Title band. When the report is  exported word/pdf file from server, I could see the data has not displayed for the reports having data consuming elements.

If the same sub report published as an individual entity to the server it worked but that's not an option here because this report was one of the sub reports for parent.

Tried "when no data found" property and elements position type properties but non of them worked.

Randomly, added "summary" band to the master/parent report and tried calling the sub report from this band , it worked, i.e., data has displayed for the elements from sub report when ran the master/parent report.

No idea or clue on exact reason for why data is not displayed when keeping the sub report in master/parent report, however, summary solved it.

As a best practice, I would recommend to keep sub reports in summary band instead any other report bands.

No comments:

Post a Comment