Directly embedded subreport in JasperReports

I am so close to this work, I am trying to directly insert one report in jasper into the main xml report of another. You would think that it will be easy, but I can not find a single example for this. Everyone seems to be using files or resources or something else. I have one report that works right from the line, and I want it to contain it in the report.

Is anyone Syntax? Thanks!

+4
source share
1 answer

The only way I know to do this with JasperReports is to use a separate .jrxml file for sub-reporting and include it in the main report using the subreport command.

Another option you have for any built-in reports is to use subjects, but as far as I know, they are only useful for graphs.

It looks like you are managing code related to report generation, you can create a simple format for defining several reports on one line, and then have your code retrieve each report at run time.

When we need to deal with one file, but there are signatures for JasperReport, we used Zip files and simply fixed the main report and all the necessary sub-reports, and then unpacked them into a temporary directory when we needed (everything is in the code, of course)

+2
source

All Articles