subreports are not executing in jasperserver

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 :

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
kunkasurendra's picture
Joined: Jun 12 2007 - 3:43pm
Last seen: 5 years 3 weeks ago

1 Answer:

kunkasurendra wrote:
java.lang.ClassCastException: com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.client.ReportUnitImpl


You've uploaded the subreports as report units, but you need to upload them as JRXML (file) resources.

HTH,
Lucian
lucianc's picture
86987
Joined: Jul 17 2006 - 1:10am
Last seen: 2 hours 13 min ago
Feedback
randomness