Jump to content
JasperReports Library 7.0 is now available ×

Hi I am seeking help with dynamic subreports


rossputin

Recommended Posts

Hi all,

 

I hope someone can help, or suggest an alternative to my idea. I have a need to dynamically specify the subreport to call, based on the value of a field.

 

For example, my idea is to do something like...

 

Code:

<subreportExpression class="net.sf.jasperreports.engine.JasperReport">
<![CDATA[$F{report_name}]]>
</subreportExpression>

where I already have the parameter for the report declared above, like...

 

Code:
[code]
<parameter name="Subreport1" class="net.sf.jasperreports.engine.JasperReport">
</parameter>

 

'report_name' would have the value of 'Subreport1' initially, and can then read values from a query.

 

Obviously this won't work at the moment, and I am trying to figure out the syntax to do it.

 

Thanks in advance for your help,

 

regards

 

Ross

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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