[ACCEPTED]-JasperReports: How to pass parameter to subReport-jasper-reports
Accepted answer
Try using iReport if you are not.
When viewing a 10 report within iReport you can select the 9 properties of the subreport within the main 8 report.
In this there is an option in Subreport properties
called 7 Parameters
. Using this you can pass parameters to 6 your subreport.
Select this and click the 5
Add
button.Then click the button right of the
Value expression
BoxNext 4 an option screen will pop up where you can 3 select the parameter from the master report 2 you want to pass.
If you want to do it via 1 xml here's a quick example.
<subreport>
<subreportParameter name="XML_ID">
<subreportParameterExpression>
<![CDATA[$P{MASTER_REPORT_PARAMETER}]]></subreportParameterExpression>
</subreportParameter>
</subreport>
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.