Hi Dave,

Did you make any progress with this?

The approach I've used is for the action to set up a JRDataSource instance in a public property. The DataSource is defined as a normal parameter in the Master Report. The Jasper Result passes this JRDataSource instance to the Master report through the parameter and the Master report passes the datasource to the subreport through a dataSourceExpression.

Although it's possible for the action to setup a JRHibernateListDataSource/JRJpaDataSource/other JRDataSource instance, I instead created a subclass of JRAbstactBeanDataSource that performs an nested iteration over the nested collection(s). I'm not sure if that makes sense - it runs multiple iterators to unroll the nested collection as the master collection is iterated over.

This basically means there's no additional code in the action other than to define the JRDataSources for the subreports.

I'm interested to hear if you solved it another way.

regards,
Jeromy Evans


Dave Newton wrote:
This might be a JasperReports question; not sure yet.

I'm trying to figure out if there's a way I can use sub-reports via the
JasperReports plugin. I have a reasonably complicated data structure with
multiple nested collections.

At this point I might just write XML and use an XML datasource and use JR by
hand, but I'd really like to avoid that if possible.

Thanks,
Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to