I had 3 subreports. I uploaded the three subreport files to JasperServer as jrxml files. They are in the repository folder [root]/reports/subreports.
Now I want to include them in my main report, which is located in [root]/reports.
I edited the subreport references in the main jrxml to look as follows:
repo:/reports/subreports/StatusResponse
repo:/reports/subreports/workflow
repo:/reports/subreports/version
In main report :
Now I want to include them in my main report, which is located in [root]/reports.
I edited the subreport references in the main jrxml to look as follows:
repo:/reports/subreports/StatusResponse
repo:/reports/subreports/workflow
repo:/reports/subreports/version
In main report :
Code: |
<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String"><br /> <defaultValueExpression><br /> <![CDATA["repo:/reports/subreports"]]><br /> </defaultValueExpression><br /> </parameter><br /> </td></tr></tbody></table><br /> <br /> <table align="center" border="0" cellpadding="3" cellspacing="1" width="90%"><tbody><tr><td><b>Code:</b></td></tr><tr><td><pre><connectionExpression><br /> <![CDATA[$P{REPORT_CONNECTION}]]><br /> </connectionExpression><br /> <subreportExpression class="java.lang.String"><br /> <![CDATA["repo:/reports/subreports/workflow"]]><br /> </subreportExpression></td></tr></tbody></table><br /> <br /> <br /> <br /> then I got this exception<br /> <br /> <b>java.lang.ClassCastException: com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.client.ReportUnitImpl</b><br /> <br /> <br /> Please can any one help me ?<br /> <br /> <br /> <br /> Thanks in advance |