Return a variable from one subreport to another subreport in Jaspersoft Ireport

I have a main report in jaspersoft. In the main report, I used two subregions. Inside one of the subreports, I have a Total Cash variable. I should use this Total Cash variable in my next subregion. Is it possible to transfer a variable from one SubReport to another SubReport. If not, how to transfer the variable from SubReport to the main report.

Thank.

+5
source share
2 answers

, returnValue. $V {result} $V {total} -. iReport jrxml-. Subreports .

<subreport isUsingCache="true">
  <reportElement x="18" y="11" width="189" height="77" key="subreport-1" />
  <connectionExpression>
    <![CDATA[$P{REPORT_CONNECTION}]]>
</connectionExpression>
  <returnValue subreportVariable="total" toVariable="result" />
  <subreportExpression class="java.lang.String">
    <![CDATA["C:/Program Files/JasperSoft/iReport-3.0.0/compile/Untitled_report_2.jasper"]]>
</subreportExpression>
</subreport>
+1

:

, passive passive . , , .

0

All Articles