Jump to content
We've recently updated our Privacy Statement, available here ×

Getting Infinite loop creating new page due to column header overflow.


Ram Ayanavilli

Recommended Posts

Hi All,

I am Naresh and I am working as Jasper Developer. Recently I getting one issue with existing(created by some one) report i.e, net.sf.jasperreports.engine.JRRuntimeException: Infinite loop creating new page due to column header overflow.

However in this report I don't have any report and it contains page header, column header and footers with detailband. While I am trying to run the report with 1000 records of data I am not getting any issues but if trying to execute the report with huge data I am getting the above issue. Not able to understand the behaviour of this report and how to fix issue.

I am using iReport 3.7.0. I know it is outdated but for maintanance we have to use this. I checked split type as Stretch and splitType ='true' for PageHeader, Column Header and Page footer and Column footer. And also used printwhen expression to avoid the repeated headers for one page.  Can you please help me to avoid this issue and please let me know if I missed anything in this report.

 

Code: 

<pageHeader><br>        <band height="97" splitType="Stretch"><br>            <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression><br>            <textField isBlankWhenNull="false"><br>                <reportElement key="textField-22" x="42" y="37" width="206" height="30"/><br>                <box><br>                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Left" verticalAlignment="Middle"><br>                    <font fontName="Arial" size="14" isBold="true" pdfFontName="Helvetica-Bold"/><br>                </textElement><br>                <textFieldExpression class="java.lang.String"><![CDATA["Stock Management Report  "]]></textFieldExpression><br>            </textField><br>            <image><br>                <reportElement key="image-1" x="563" y="19" width="105" height="52"/><br>                <box><br>                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <imageExpression class="java.lang.String"><![CDATA[$P{IMAGE_PATH}]]></imageExpression><br>            </image><br>            <line><br>                <reportElement key="line-1" x="42" y="77" width="626" height="1"/><br>            </line><br>            <textField isBlankWhenNull="true"><br>                <reportElement key="textField-23" x="434" y="80" width="234" height="17"/><br>                <box><br>                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Right" verticalAlignment="Middle"><br>                    <font size="10"/><br>                </textElement><br>                <textFieldExpression class="java.lang.String"><![CDATA[$P{REPORT_DATE}]]></textFieldExpression><br>            </textField><br>        </band><br>    </pageHeader><br>    <columnHeader><br>        <band height="64" splitType="Stretch"><br>            <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression><br>            <staticText><br>                <reportElement key="staticText-20" mode="Opaque" x="42" y="34" width="32" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[s#]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-21" mode="Opaque" x="74" y="34" width="90" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[Product Id]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-22" mode="Opaque" x="164" y="34" width="153" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[Redemption Description]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-23" mode="Opaque" x="317" y="34" width="98" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[Opening Balance]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-24" mode="Opaque" x="415" y="34" width="80" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[stock IN]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-25" mode="Opaque" x="495" y="34" width="80" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[stock OUT]]></text><br>            </staticText><br>            <staticText><br>                <reportElement key="staticText-26" mode="Opaque" x="575" y="34" width="81" height="30" backcolor="#F7F7F7"/><br>                <box><br>                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/><br>                </box><br>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled"><br>                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/><br>                </textElement><br>                <text><![CDATA[Closing Balance]]></text><br>            </staticText><br>        </band><br>    </columnHeader>[/code]

 <pageHeader>
        <band height="97" splitType="Stretch">
            <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression>
            <textField isBlankWhenNull="false">
                <reportElement key="textField-22" x="42" y="37" width="206" height="30"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font fontName="Arial" size="14" isBold="true" pdfFontName="Helvetica-Bold"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA["Stock Management Report  "]]></textFieldExpression>
            </textField>
            <image>
                <reportElement key="image-1" x="563" y="19" width="105" height="52"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <imageExpression class="java.lang.String"><![CDATA[$P{IMAGE_PATH}]]></imageExpression>
            </image>
            <line>
                <reportElement key="line-1" x="42" y="77" width="626" height="1"/>
            </line>
            <textField isBlankWhenNull="true">
                <reportElement key="textField-23" x="434" y="80" width="234" height="17"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Right" verticalAlignment="Middle">
                    <font size="10"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA[$P{REPORT_DATE}]]></textFieldExpression>
            </textField>
        </band>
    </pageHeader>
    <columnHeader>
        <band height="64" splitType="Stretch">
            <printWhenExpression><![CDATA[$V{PAGE_NUMBER}==1]]></printWhenExpression>
            <staticText>
                <reportElement key="staticText-20" mode="Opaque" x="42" y="34" width="32" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[s#]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-21" mode="Opaque" x="74" y="34" width="90" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Product Id]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-22" mode="Opaque" x="164" y="34" width="153" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Redemption Description]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-23" mode="Opaque" x="317" y="34" width="98" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Opening Balance]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-24" mode="Opaque" x="415" y="34" width="80" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[stock IN]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-25" mode="Opaque" x="495" y="34" width="80" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[stock OUT]]></text>
            </staticText>
            <staticText>
                <reportElement key="staticText-26" mode="Opaque" x="575" y="34" width="81" height="30" backcolor="#F7F7F7"/>
                <box>
                    <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">
                    <font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
                </textElement>
                <text><![CDATA[Closing Balance]]></text>
            </staticText>
        </band>
    </columnHeader>

<columnFooter>
        <band splitType="Stretch"/>
    </columnFooter>
    <pageFooter>
        <band height="24" splitType="Stretch">
            <textField evaluationTime="Report" pattern="dd/MM/yyyy HH.mm.ss" isBlankWhenNull="false">
                <reportElement key="textField" x="53" y="13" width="100" height="10" forecolor="#CCCCCC"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font fontName="Arial" size="8"/>
                </textElement>
                <textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement key="staticText-27" x="185" y="13" width="291" height="11" forecolor="#CCCCCC"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Times New Roman" size="8"/>
                </textElement>
                <text><![CDATA[Zafin Labs Loyalty System]]></text>
            </staticText>
            <textField isBlankWhenNull="false">
                <reportElement key="textField" x="554" y="11" width="65" height="12" forecolor="#CCCCCC"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement textAlignment="Right">
                    <font fontName="Arial" size="8"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report" isBlankWhenNull="false">
                <reportElement key="textField" x="624" y="11" width="41" height="12" forecolor="#CCCCCC"/>
                <box>
                    <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                    <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
                </box>
                <textElement>
                    <font fontName="Arial" size="8"/>
                </textElement>
                <textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER} + ""]]></textFieldExpression>
            </textField>
            <line>
                <reportElement key="line-2" x="42" y="7" width="603" height="1" forecolor="#CCCCCC"/>
            </line>
        </band>
    </pageFooter>

 

Link to comment
Share on other sites

  • 4 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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