2006 IR Open Dicussion Posted August 26, 2006 Share Posted August 26, 2006 By: JuliLogan - julilogan Help with nested groups 2006-02-08 08:24 Hi all! I'm trying to write a report with two nested groups. I have done a master and a subreport because I have two different datasource and the subreport detasource is a field of the master.. Essential code: ---- Master.xml ---- <field name="subreportDataSource" class="java.lang.Object"/> <parameter name="Subreport" isForPrompting="true" class="net.sf.jasperreports.engine.JasperReport"/> <subreport isUsingCache="true"> <reportElement/> <dataSourceExpression>${subreportDataSource}</dataSourceExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport">$P{Subreport}</subreportExpression> </subreport> ---- MasterBean.java ---- public JRBeanCollectionDataSource getSubreportDataSource() { JRBeanCollectionDataSource subDataSource = new JRBeanCollectionDataSource( SubreportBeanFactory.getBeanCollection(list)); return subDataSource; } Is that correct? If I go in debug with a break in the SubreportBeanFactory and it enters with the correct values for "list" but after few iterations it seems to loop in same place (I don't know where) and doesn't return in the factory.. Thanxs!! 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