Jump to content
Changes to the Jaspersoft community edition download ×

Pass variable comes from a subreport to subreport2


marcio_fe_s

Recommended Posts

  • 4 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

I am not sure, but I think you can define a subreport parameter and set the expression of the parameter to the value of the variable previously returned.

<subreport  isUsingCache="false">
   <reportElement
      x="0"
      y="91"
      width="274"
      height="5"
      key="zerovalues"/>
      <subreportParameter  name="NameOfParameterPassedToSubReport">
         <subreportParameterExpression><![CDATA[$V{MasterReportVariable}]]></subreportParameterExpression>
      </subreportParameter>
      <subreportExpression  class="java.lang.String"><![CDATA["SubReportName.jasper"]]></subreportExpression>
</subreport>
 

Edward.

Link to comment
Share on other sites

hello Edward.

Thanks for your reply. I tried these way, but still i am getting null . The variable displayed correctly when I displayed it on the master report (returned variable), but its null when i pass this value to another subreport

 

 

Thanks

Suni

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...