I am trying to create a report from java code with jasper messages (without iReport).
Successfully created the following elements:
- The main report object (class: JasperDesign) named reportDesign
- A subreport report object (class: JasperDesign) named subReportDesign
- SubReport element (class: JRDesignSubreport) in the main report named subReportElement
- Compiled Sub report (class: JasperDesign) named subReport
The problem is, how can I refer to the subReportDesign object from subReportElement ?
So far, the only way I have found was to set the subReportElement "expression" in the $P{REPORT_PARAMETERS_MAP}.get("subreportobject")
field and put subReport in reportDesign at compile time.
Is there another way? For example, is it possible to use variables - in some way ... - before compiling the main report?
thanks krisy
krisy source share