2005 IR Help Posted August 27, 2006 Share Posted August 27, 2006 By: appleRun - applerun nested subreport not showing 2004-09-28 13:44 Hi, I am trying to use a nested subreport but it isn't working. The next() method of the nested subreports datasource isn't being called for some reason. Heres some XML, if anyone wants to take a look and see what I'm doing wrong. MainReport--------------------------------------------------------------------------------------------------------------- <jasperReport name="DataSourceReport" pageWidth="612" pageHeight="792" leftMargin="36" rightMargin="36" topMargin="20" bottomMargin="38" columnCount="1" columnWidth="540" isTitleNewPage="false" isSummaryNewPage="false" orientation="Portrait" > <parameter name="SummaryDataSource" class="net.sf.jasperreports.engine.JRDataSource"/> <field name="Count" class="java.lang.Integer"/> <group name="summaryGroup" isStartNewPage="false"> <groupExpression> $F{Count} </groupExpression> <groupHeader> <band height="705"> <subreport isUsingCache="true"> <reportElement x="0" y="0" width="540" height="705"/> <dataSourceExpression> $P{SummaryDataSource} </dataSourceExpression> <subreportExpression class="java.lang.String"> "com/Summary.object" </subreportExpression> </subreport> </band> </groupHeader> </group> ... SubReport---------------------------------------------------------------------------------------------------------- <jasperReport name="DataSourceReport" pageWidth="612" pageHeight="792" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" columnCount="1" columnWidth="540" isTitleNewPage="false" isSummaryNewPage="false" orientation="Portrait" > <parameter name="AnotherDataSource" class="net.sf.jasperreports.engine.JRDataSource"/> <field name="theCount" class="java.lang.Integer"/> <group name="Group2" isStartNewPage="true"> <groupExpression> $F{theCount} </groupExpression> <groupHeader> <band height="705"> <subreport isUsingCache="true"> <reportElement x="0" y="0" width="540" height="150"/> <dataSourceExpression> $P{AnotherDataSource} </dataSourceExpression> <subreportExpression class="java.lang.String"> "com/Another.object" </subreportExpression> </subreport> </band> </groupHeader> </group> </jasperReport> By: appleRun - applerun RE: nested subreport not showing 2004-09-28 13:45 Just a note, these are just the relevant parts of the XML file 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