marcio_fe_s Posted November 26, 2008 Share Posted November 26, 2008 I do a report that has two subreports. The first one, just calculate some value, in a variable. When I return this value to parent report I can print this on report normally. But I need pass this same value to another subreport, but the value always is null. Link to comment Share on other sites More sharing options...
sunianu Posted December 22, 2008 Share Posted December 22, 2008 Hello.... Were you able to achive this? My requirement is also the same. I am also getting null . ThanksSuni Link to comment Share on other sites More sharing options...
ejhellerattc Posted December 23, 2008 Share Posted December 23, 2008 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 More sharing options...
sunianu Posted December 29, 2008 Share Posted December 29, 2008 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 ThanksSuni Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now