Jump to content
Changes to the Jaspersoft community edition download ×

subreports are not executing in jasperserver


kunkasurendra

Recommended Posts

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">
<defaultValueExpression>
<![CDATA["repo:/reports/subreports"]]>
</defaultValueExpression>
</parameter>

 

Code:
[code]<connectionExpression>
<![CDATA[$P{REPORT_CONNECTION}]]>
</connectionExpression>
<subreportExpression class="java.lang.String">
<![CDATA["repo:/reports/subreports/workflow"]]>
</subreportExpression>

 

 

 

then I got this exception

 

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

 

 

Please can any one help me ?

 

 

 

Thanks in advance

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...