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

LastePageFooter content is displayed sometimes on blank page instead of last page


natikarsunil

Recommended Posts

LastePageFooter content is displayed sometimes on last blank page instead of last page with data.

my jrxml is as below

<?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                                  http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"              name="GoalsSummary" columnCount="3" printOrder="Horizontal" pageWidth="842"              pageHeight="542" orientation="Landscape" whenNoDataType="AllSectionsNoDetail"              columnWidth="267" leftMargin="20" rightMargin="20" topMargin="20"              bottomMargin="20" isSummaryWithPageHeaderAndFooter="true"              uuid="d67c8701-858a-48bb-b6d1-6b2ac94cafb8">    <property name="ireport.zoom" value="1.100000000000001"/>    <property name="ireport.x" value="0"/>    <property name="ireport.y" value="0"/>    <style name="table">        <box>            <pen lineWidth="1.0" lineColor="#FFFFFF"/>        </box>    </style>    <style name="table_TH" mode="Opaque" backcolor="#FFFFFF">        <box>            <topPen    lineWidth="0.5" lineColor="#FFFFFF"/>            <bottomPen lineWidth="0.5" lineColor="#FFFFFF"/>        </box>    </style>    <style name="table_CH" mode="Opaque" backcolor="#FFBFBF">        <box>            <topPen    lineWidth="0.5" lineColor="#FFFFFF"/>            <bottomPen lineWidth="0.5" lineColor="#FFFFFF"/>        </box>    </style>    <style name="table_TD" mode="Opaque" backcolor="#FFFFFF">        <box>            <topPen    lineWidth="0.5" lineColor="#FFFFFF"/>            <bottomPen lineWidth="0.5" lineColor="#FFFFFF"/>        </box>    </style>    <subDataset name="Table Dataset 1" uuid="deae39d2-c98e-4d54-b0b9-badebdf53f47"/>    <parameter name="keyLableGoalProgress" class="java.lang.String"/>    <parameter name="keyLableCurrentGoalTotal" class="java.lang.String"/>    <parameter name="keyLableGoalSummary" class="java.lang.String"/>    <parameter name="hicon" class="java.io.InputStream"/>    <parameter name="disclaimerText" class="java.lang.String"/>    <parameter name="goalsSummaryNoRecordsFound" class="java.lang.Boolean"/>    <parameter name="progressMarkerIcon" class="java.io.InputStream"/>    <parameter name="goalTitleIcon" class="java.io.InputStream"/>    <field name="goalCurrentTotal" class="java.lang.String"/>    <field name="goalTitle" class="java.lang.String"/>    <field name="goalTargetValue" class="java.lang.String"/>    <field name="remainingDays" class="java.lang.String"/>    <field name="goalStartDate" class="java.lang.String"/>    <field name="goalEndDate" class="java.lang.String"/>    <field name="goalChartImg" class="java.io.InputStream"/>    <background>        <band splitType="Stretch"/>    </background>    <pageHeader>        <band height="33" splitType="Stretch">            <rectangle>                <reportElement mode="Opaque" x="0" y="1" width="802" height="32"                               isRemoveLineWhenBlank="true" backcolor="#134675"                               uuid="2854460e-313e-46d0-8e4b-29dd49e69195"/>                <graphicElement>                    <pen lineWidth="0.0"/>                </graphicElement>            </rectangle>            <image isUsingCache="true" onErrorType="Icon">                <reportElement x="5" y="7" width="793" height="20"                               isRemoveLineWhenBlank="true"                               uuid="d91b2527-abdb-4c1a-91b7-c69ff0f349d8"/>                <imageExpression><![CDATA[$P{hicon}]]></imageExpression>            </image>        </band>    </pageHeader>    <detail>        <band height="351" splitType="Stretch">            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="0" y="47" width="266" height="20" isRemoveLineWhenBlank="true"                               forecolor="#9B9B9B" uuid="b59bdefd-4f9b-43ce-a211-3107d4d4daae"/>                <textElement textAlignment="Center" verticalAlignment="Middle">                    <font fontName="Proxima Nova Rg" size="9"/>                </textElement>                <textFieldExpression><![CDATA[$P{keyLableGoalProgress}]]></textFieldExpression>            </textField>            <image hAlign="Center">                <reportElement x="0" y="70" width="266" height="150" isRemoveLineWhenBlank="true"                               uuid="b5aef56a-7d85-4eb2-b6c5-70076c5db4a2"/>                <imageExpression><![CDATA[$F{goalChartImg}]]></imageExpression>            </image>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="0" y="222" width="266" height="18" isRemoveLineWhenBlank="true"                               forecolor="#404040" uuid="a9c931b3-c2d3-4100-8f23-346eb19ae8ff"/>                <textElement textAlignment="Center" verticalAlignment="Middle">                    <font fontName="Proxima Nova Rg" size="10" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$P{keyLableCurrentGoalTotal}]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="1" y="241" width="266" height="23" isRemoveLineWhenBlank="true"                               forecolor="#505050" uuid="5283ba27-c49e-4ad3-b528-e50d12b9ed4c"/>                <textElement textAlignment="Center">                    <font fontName="Proxima Nova Rg" size="22" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$F{goalCurrentTotal}]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="0" y="275" width="266" height="20" isRemoveLineWhenBlank="true"                               forecolor="#9B9B9B" uuid="ee13f6ad-6ff8-435a-81ad-add651b23da0"/>                <textElement textAlignment="Center">                    <font fontName="Proxima Nova Rg" size="12"/>                </textElement>                <textFieldExpression>                    <![CDATA[$P{keyLableGoalSummary} + ' ' + $F{goalTargetValue}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="0" y="325" width="266" height="15" isRemoveLineWhenBlank="true"                               forecolor="#404040" uuid="f860f333-1b78-4017-a6e7-4b36ccd989e6"/>                <textElement textAlignment="Center">                    <font fontName="Proxima Nova Bl" size="11" isBold="true"/>                </textElement>                <textFieldExpression><![CDATA[$F{remainingDays}]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="0" y="311" width="266" height="15" isRemoveLineWhenBlank="true"                               forecolor="#505050" uuid="db9e502e-1857-49e2-a513-d923c021f7c5">                    <printWhenExpression>                        <![CDATA[$F{goalEndDate} != null && $F{goalEndDate}.trim().length()>0]]>                    </printWhenExpression>                </reportElement>                <textElement textAlignment="Center">                    <font fontName="Proxima Nova Bl" size="9" isBold="true"/>                </textElement>                <textFieldExpression>                    <![CDATA["Start Date: " + $F{goalStartDate} + " | End Date: " +$F{goalEndDate}]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement positionType="Float" stretchType="RelativeToTallestObject"                               x="0" y="12" width="266" height="33" isRemoveLineWhenBlank="true"                               forecolor="#505050" uuid="e0e1dd08-d55d-4591-a9f7-60d356f7c194"/>                <box leftPadding="3"/>                <textElement textAlignment="Center" verticalAlignment="Middle" markup="styled">                    <font fontName="Proxima Nova Rg" size="15" isBold="true" isItalic="false"/>                </textElement>                <textFieldExpression><![CDATA[$F{goalTitle}]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement x="1" y="311" width="266" height="15" isRemoveLineWhenBlank="true"                               forecolor="#505050" uuid="7e945b1e-ec6b-4a00-8a38-44383b7dfa8b">                    <printWhenExpression>                        <![CDATA[$F{goalEndDate} != null && $F{goalEndDate}.trim().length()==0]]>                    </printWhenExpression>                </reportElement>                <textElement textAlignment="Center">                    <font fontName="Proxima Nova Bl" size="9" isBold="true"/>                </textElement>                <textFieldExpression>                    <![CDATA["Start Date: " + $F{goalStartDate}]]>                </textFieldExpression>            </textField>        </band>    </detail>    <pageFooter>        <band height="20" splitType="Stretch">            <textField isStretchWithOverflow="true"                       pattern="MM/dd/yyyy HH:mm:ss" isBlankWhenNull="true">                <reportElement positionType="Float" x="0" y="0" width="100" height="20"                               isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"                               forecolor="#404040" uuid="9a5a260b-4004-4cc0-8b21-c80946c93bb4"/>                    <textElement>                        <font fontName="Proxima Nova Rg"/>                    </textElement>                    <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement positionType="Float" x="619" y="0" width="145" height="20"                               isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"                               forecolor="#404040" uuid="4784b8c1-6f40-4e7f-bf84-39f97db711ca"/>                <textElement textAlignment="Right">                    <font fontName="Proxima Nova Rg"/>                </textElement>                <textFieldExpression>                    <![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]>                </textFieldExpression>            </textField>            <textField isStretchWithOverflow="true" evaluationTime="Report" isBlankWhenNull="true">                <reportElement positionType="Float" x="768" y="0" width="33" height="20"                               isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"                               forecolor="#404040" uuid="7d9b2841-a17d-4af2-8de0-fd0ccbd30e50"/>                <textElement>                    <font fontName="Proxima Nova Rg"/>                </textElement>                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>            </textField>        </band>    </pageFooter>    <lastPageFooter>        <band height="20" splitType="Immediate">            <textField isStretchWithOverflow="true" isBlankWhenNull="true">                <reportElement positionType="Float" x="0" y="0" width="801" height="20"                               isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"                               forecolor="#404040" uuid="24b7a369-93ef-4ddc-a490-e31a38452862"/>                <textElement textAlignment="Justified" verticalAlignment="Middle" markup="html">                    <font fontName="Proxima Nova Rg" size="9" isBold="false"/>                </textElement>                <textFieldExpression>                    <![CDATA[$P{disclaimerText}.trim()]]>                </textFieldExpression>            </textField>        </band>    </lastPageFooter></jasperReport>[/code]
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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