2001 JI Open Discussion Posted August 21, 2006 Share Posted August 21, 2006 By: allie - allie910 use field of master as param for subreport ? 2005-02-10 18:30Hi all, I am quite new in using jasper here.... and I have a question regarding subreport, I have read the documentation of jasper and jasperassistant manual, but dont think I found it.... :'( here's my case : I have a master report using a subreport inside it. My question is : Can I use the result of the Query field in the master report to be passed to the subreport as its parameter for the subquery ? Thanks alot for the helpp................... ;)) By: Tobias Gaekle - ike987 RE: use field of master as param for subrepor 2005-02-11 08:03use a subreport parameter like this inside your subreport definition: <subreportParameter class="java.lang.String" name="mySubreportField"> <subreportParameterExpression><![CDATA[$F{myField}]]></subreportParameterExpression> </subreportParameter> in the subreport, define and use the parameter "mySubreportField" as you would with a normal parameter. http://jasperreports.sourceforge.net/quick.reference.html#subreport Link to comment Share on other sites More sharing options...
waqar Posted September 30, 2010 Share Posted September 30, 2010 Can i do the same with current iReport.<subreportParameter class="java.lang.String" name="mySubreportField"> <subreportParameterExpression><![CDATA[$F{myField}]]></subreportParameterExpression></subreportParameter> The suggested page is also moved somewhere else is there is any updated veresion of this page then please let me know. http://jasperreports.sourceforge.net/quick.reference.html#subreportw 2001 JI Open DiscussionWrote: By: allie - allie910 use field of master as param for subreport ? 2005-02-10 18:30 Hi all, I am quite new in using jasper here.... and I have a question regarding subreport, I have read the documentation of jasper and jasperassistant manual, but dont think I found it.... :'( here's my case : I have a master report using a subreport inside it. My question is : Can I use the result of the Query field in the master report to be passed to the subreport as its parameter for the subquery ? Thanks alot for the helpp................... ;)) By: Tobias Gaekle - ike987 RE: use field of master as param for subrepor 2005-02-11 08:03 use a subreport parameter like this inside your subreport definition: <subreportParameter class="java.lang.String" name="mySubreportField"> <subreportParameterExpression><![CDATA[$F{myField}]]></subreportParameterExpression> </subreportParameter> in the subreport, define and use the parameter "mySubreportField" as you would with a normal parameter. http://jasperreports.sourceforge.net/quick.reference.html#subreport Link to comment Share on other sites More sharing options...
teodord Posted October 1, 2010 Share Posted October 1, 2010 Hi, This continues to work with iReport even today. The JRXML documentation has moved here:http://jasperreports.sourceforge.net/schema.reference.html#subreport Thanks,Teodor 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