Jump to content
We've recently updated our Privacy Statement, available here ×

use field of master as param for subreport ?


Recommended Posts

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

  • 4 years later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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#subreport

w

 

2001 JI Open Discussion
Wrote:

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

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