Hi All,
I am getting a JRRuntimeException for "Infinite loop creating new page due to column header overflow.". Basically, i had a subreport for a set of values for attributes and i want to display another set of values for the same attributes in another page (page 2 in this report). The header and footer are static between those two sets of values.
With just one sub report the main report ran fine and displayed everything as desgined, when i added another subreport (initially with a page break and then i took it out to see if it makes a difference) i run into this exception. I tried changing the position type of subreport1 to "Fix Relative to Top" and Print in first whole band to "true" and changing the position type of subreport2 to "Float" and Print in first whole band to "false" but no luck.
Any suggestions/recommendations are welcome since i am not able to find much info on such not so straightforward use cases. I have attached the jrxml for the main report for your reference.
Thanks.
********************************EDITING***********************************************
I figured out a way to fix this and just wanted to note it in case someone stumbled upon the same issue. I moved the subreports from the column header to the summary band and that got rid of the exceptioni. Since i wanted the subreports in separate pages, i introduced page breaks between each sub report and applied header and footer to all the sub reports. Not sure where to "reply" to my own question and hence am just editing my question with the answer.
****************************************************************************************
Code: |
<?xml version="1.0" encoding="UTF-8"?> <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports <a target="_blank" href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd""><a href="http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"" target="_blank">http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"</a></a> name="dlr_report1" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="AllSectionsNoDetail" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="table"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table_TH" mode="Opaque" backcolor="#F8F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_CH" mode="Opaque" backcolor="#BFBFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> <conditionalStyle> <conditionExpression><![CDATA[new Boolean($V{REPORT_COUNT}.intValue()%2==0)]]></conditionExpression> <style backcolor="#EFEFFF"/> </conditionalStyle> </style> <style name="Crosstab Data Text" hAlign="Center"/> <style name="table 1"> <box> <pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table 1_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="table 1_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> </box> </style> <parameter name="address1" class="java.lang.String"/> <parameter name="address2" class="java.lang.String"/> <parameter name="dealerShipName" class="java.lang.String"/> <parameter name="accountRepName" class="java.lang.String"/> <parameter name="accountRepEmail" class="java.lang.String"/> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA["./"]]></defaultValueExpression> </parameter> <parameter name="dlrListedNewValue" class="java.lang.String"/> <parameter name="vehicleListedNewValue" class="java.lang.String"> <defaultValueExpression><![CDATA["55"]]></defaultValueExpression> </parameter> <parameter name="dlrInventoryPageNewValue" class="java.lang.String"/> <parameter name="dlrHrsDirectionsPageNewValue" class="java.lang.String"/> <parameter name="dlrSalesReviewPageNewValue" class="java.lang.String"/> <parameter name="dlrServiceReviewPageNewValue" class="java.lang.String"/> <parameter name="dlrVDPageNewValue" class="java.lang.String"/> <parameter name="dlrClkWebsiteNewValue" class="java.lang.String"/> <parameter name="dlrTotalEmailsNewValue" class="java.lang.String"/> <parameter name="dlrTotalCallsNewValue" class="java.lang.String"/> <parameter name="dlrTotalChatsNewValue" class="java.lang.String"/> <parameter name="newLiveDateValue" class="java.lang.String"/> <parameter name="newDlrRadiusValue" class="java.lang.String"/> <parameter name="newTrackableNumberValue" class="java.lang.String"/> <parameter name="newDlrEmailValue" class="java.lang.String"/> <parameter name="newAvgVehiclesListedValue" class="java.lang.String"/> <parameter name="usedLiveDateValue" class="java.lang.String"/> <parameter name="monthlyUsedLotSizeValue" class="java.lang.String"/> <parameter name="usedTrackableNumberValue" class="java.lang.String"/> <parameter name="usedDlrEmailValue" class="java.lang.String"/> <parameter name="usedAvgVehiclesListedValue" class="java.lang.String"/> <parameter name="dlrListedUsedValue" class="java.lang.String"/> <parameter name="vehicleListedUsedValue" class="java.lang.String"/> <parameter name="dlrInventoryPageUsedValue" class="java.lang.String"/> <parameter name="dlrHrsDirectionsPageUsedValue" class="java.lang.String"/> <parameter name="dlrSalesReviewPageUsedValue" class="java.lang.String"/> <parameter name="dlrServiceReviewPageUsedValue" class="java.lang.String"/> <parameter name="dlrVDPageUsedValue" class="java.lang.String"/> <parameter name="dlrClkWebsiteUsedValue" class="java.lang.String"/> <parameter name="dlrTotalEmailsUsedValue" class="java.lang.String"/> <parameter name="dlrTotalCallsUsedValue" class="java.lang.String"/> <parameter name="dlrTotalChatsUsedValue" class="java.lang.String"/> <variable name="address1" class="java.lang.String"/> <variable name="address2" class="java.lang.String"/> <variable name="dealerShipName" class="java.lang.String"/> <variable name="accountRepName" class="java.lang.String"/> <variable name="accountRepEmail" class="java.lang.String"/> <background> <band splitType="Stretch"/> </background> <title> <band height="36" splitType="Stretch"> <staticText> <reportElement x="181" y="5" width="192" height="27"/> <textElement textAlignment="Center"> <font size="14" isBold="true"/> </textElement> <text><![CDATA[Dealer Report]]></text> </staticText> </band> </title> <pageHeader> <band height="82" splitType="Stretch"> <textField isStretchWithOverflow="true"> <reportElement x="0" y="39" width="161" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{address1}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="3" y="57" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{address2}]]></textFieldExpression> </textField> <textField> <reportElement x="0" y="10" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{dealerShipName}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="397" y="35" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{accountRepName}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="398" y="53" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{accountRepEmail}]]></textFieldExpression> </textField> </band> </pageHeader> <columnHeader> <band height="127"> <subreport isUsingCache="false"> <reportElement x="1" y="0" width="555" height="127" isPrintInFirstWholeBand="true"/> <subreportParameter name="dlr_VDPage_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrVDPageNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_ClkWebsite_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrClkWebsiteNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression><![CDATA[$P{SUBREPORT_DIR}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalChats_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalChatsNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_InventoryPage_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrInventoryPageNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="vehicle_Listed_NewValue"> <subreportParameterExpression><![CDATA[$P{vehicleListedNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalCalls_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalCallsNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_ServiceReviewPage_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrServiceReviewPageNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_HrsDirectionsPage_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrHrsDirectionsPageNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_SalesReviewPage_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrSalesReviewPageNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_Listed_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrListedNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalEmails_NewValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalEmailsNewValue}]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "dlr_report1_subreport1.jasper"]]></subreportExpression> </subreport> <subreport> <reportElement positionType="Float" x="3" y="59" width="252" height="44"/> <subreportParameter name="dlr_ServiceReviewPage_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrServiceReviewPageUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="vehicle_Listed_UsedValue"> <subreportParameterExpression><![CDATA[$P{vehicleListedUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_Listed_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrListedUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_VDPage_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrVDPageUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_SalesReviewPage_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrSalesReviewPageUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_HrsDirectionsPage_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrHrsDirectionsPageUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalChats_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalChatsUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalCalls_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalCallsUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_ClkWebsite_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrClkWebsiteUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_TotalEmails_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrTotalEmailsUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="dlr_InventoryPage_UsedValue"> <subreportParameterExpression><![CDATA[$P{dlrInventoryPageUsedValue}]]></subreportParameterExpression> </subreportParameter> <subreportExpression><![CDATA[$P{SUBREPORT_DIR} + "dlr_report1_subreport2.jasper"]]></subreportExpression> </subreport> </band> </columnHeader> <pageFooter> <band height="348" splitType="Stretch"> <textField pattern="EEEEE dd MMMMM yyyy"> <reportElement x="3" y="311" width="100" height="20"/> <textElement/> <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> </textField> <staticText> <reportElement x="2" y="4" width="158" height="20"/> <textElement> <font size="11" isBold="true"/> </textElement> <text><![CDATA[New Program Info]]></text> </staticText> <textField> <reportElement x="280" y="24" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{newLiveDateValue}]]></textFieldExpression> </textField> <textField> <reportElement x="280" y="42" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{newDlrRadiusValue}]]></textFieldExpression> </textField> <textField> <reportElement x="280" y="60" width="275" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{newTrackableNumberValue}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="280" y="78" width="275" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{newDlrEmailValue}]]></textFieldExpression> </textField> <textField> <reportElement x="280" y="100" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{newAvgVehiclesListedValue}]]></textFieldExpression> </textField> <staticText> <reportElement x="3" y="131" width="158" height="20"/> <textElement> <font size="11" isBold="true"/> </textElement> <text><![CDATA[Used Program Info]]></text> </staticText> <staticText> <reportElement x="2" y="26" width="100" height="16"/> <textElement/> <text><![CDATA[Live Date]]></text> </staticText> <staticText> <reportElement x="2" y="44" width="100" height="16"/> <textElement/> <text><![CDATA[Dealer Radius]]></text> </staticText> <staticText> <reportElement x="2" y="62" width="100" height="16"/> <textElement/> <text><![CDATA[Trackable Number]]></text> </staticText> <staticText> <reportElement x="2" y="80" width="100" height="16"/> <textElement/> <text><![CDATA[Dealer Email]]></text> </staticText> <staticText> <reportElement x="2" y="102" width="100" height="16"/> <textElement/> <text><![CDATA[Avg # of Vehicles Listed per Day]]></text> </staticText> <staticText> <reportElement x="3" y="154" width="100" height="16"/> <textElement/> <text><![CDATA[Live Date]]></text> </staticText> <textField> <reportElement x="290" y="152" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{usedLiveDateValue}]]></textFieldExpression> </textField> <textField> <reportElement x="290" y="170" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{monthlyUsedLotSizeValue}]]></textFieldExpression> </textField> <textField> <reportElement x="290" y="188" width="275" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{usedTrackableNumberValue}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true"> <reportElement x="290" y="206" width="275" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{usedDlrEmailValue}]]></textFieldExpression> </textField> <textField> <reportElement x="290" y="229" width="158" height="18"/> <textElement/> <textFieldExpression><![CDATA[$P{usedAvgVehiclesListedValue}]]></textFieldExpression> </textField> <staticText> <reportElement x="3" y="172" width="100" height="16"/> <textElement/> <text><![CDATA[Monthly Used Lot Size]]></text> </staticText> <staticText> <reportElement x="3" y="190" width="100" height="16"/> <textElement/> <text><![CDATA[Trackable Number]]></text> </staticText> <staticText> <reportElement x="3" y="208" width="100" height="16"/> <textElement/> <text><![CDATA[Dealer Email]]></text> </staticText> <staticText> <reportElement x="3" y="231" width="100" height="16"/> <textElement/> <text><![CDATA[Avg # of Vehicles Listed per Day]]></text> </staticText> <frame> <reportElement x="2" y="0" width="554" height="118"/> <box> <pen lineWidth="0.5"/> <topPen lineWidth="0.5"/> <leftPen lineWidth="0.5"/> <bottomPen lineWidth="0.5"/> <rightPen lineWidth="0.5"/> </box> </frame> <frame> <reportElement x="0" y="129" width="555" height="126"/> <box> <pen lineWidth="0.5"/> <topPen lineWidth="0.5"/> <leftPen lineWidth="0.5"/> <bottomPen lineWidth="0.5"/> <rightPen lineWidth="0.5"/> </box> </frame> </band> </pageFooter> </jasperReport> |
Post Edited by coolbreeze at 07/11/2012 10:56