I am having problem with Jasper Sub Reports. I have a report template that has a subreport; in main report I have some parameters that should be available in subreport too.
Main report parameter is :
<parameter name="mainParameter" class="java.lang.Object"/>
Subreport report parameter is :
<parameter name="mainParameter" class="java.lang.Object"/>
And I provided parameters of master report for sub report like this:
<subreport isUsingCache="false">
<reportElement x="0" y="1450" width="200" height="50" isRemoveLineWhenBlank="true"/>
<subreportParameter name="mainParameter">
<subreportParameterExpression><![CDATA[$P{mainParameter}]]></subreportParameterExpression>
</subreportParameter>
<subreportExpression class="java.lang.String"><![CDATA["subReport.jasper"]]></subreportExpression>
</subreport>
Both the JRXML's were compiling properly, no issues with that. But I'm not able to get the Sub report data in generated pdf file.