Jump to content
Changes to the Jaspersoft community edition download ×

Report footer displays but does not print


jbarrow

Recommended Posts

I have two reports created using iReport that display properly in the report viewer. When printed they do not display the page footer. I am trying to print to Letter size paper. Thanks in advance.

 

James in Atlanta

 

 

Code:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
name="waste"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="595"
pageHeight="842"
columnWidth="535"
columnSpacing="0"
leftMargin="30"
rightMargin="30"
topMargin="20"
bottomMargin="20"
whenNoDataType="NoPages"
isTitleNewPage="false"
isSummaryNewPage="false">
<property name="ireport.scriptlethandling" value="0" />
<property name="ireport.encoding" value="UTF-8" />
<import value="java.util.*" />
<import value="net.sf.jasperreports.engine.*" />
<import value="net.sf.jasperreports.engine.data.*" />

<parameter name="START_DATE" isForPrompting="false" class="java.lang.String"/>
<parameter name="SITE_NAME" isForPrompting="false" class="java.lang.String"/>
<parameter name="END_DATE" isForPrompting="false" class="java.lang.String"/>

<field name="itemCode" class="java.lang.String"/>
<field name="itemName" class="java.lang.String"/>
<field name="quantity" class="java.lang.Integer"/>
<field name="fromStorageLocation" class="java.lang.String"/>
<field name="toStorageLocation" class="java.lang.String"/>
<field name="username" class="java.lang.String"/>
<field name="formattedBusinessDate" class="java.lang.String"/>
<field name="transferType" class="java.lang.String"/>

<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<title>
<band height="70" isSplitAllowed="true" >
<staticText>
<reportElement
x="129"
y="15"
width="276"
height="23"
forecolor="#000000"
backcolor="#FFFFFF"
key="staticText-1"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Center">
<font size="18" isBold="true"/>
</textElement>
<text><![CDATA[Transfer Report]]></text>
</staticText>
<staticText>
<reportElement
x="210"
y="39"
width="42"
height="11"
forecolor="#000000"
backcolor="#FFFFFF"
key="staticText-2"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[start Date:]]></text>
</staticText>
<line direction="TopDown">
<reportElement
x="2"
y="69"
width="531"
height="0"
key="line-1"/>
<graphicElement stretchType="NoStretch"/>
</line>
<staticText>
<reportElement
x="210"
y="50"
width="42"
height="11"
forecolor="#000000"
backcolor="#FFFFFF"
key="staticText-10"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="8" isBold="true"/>
</textElement>
<text><![CDATA[End Date:]]></text>
</staticText>
<staticText>
<reportElement
x="154"
y="1"
width="226"
height="16"
key="staticText-14"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Center">
<font pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
</textElement>
<text><![CDATA[Regal Entertainment Group]]></text>
</staticText>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="2"
y="1"
width="100"
height="18"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{SITE_NAME}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="253"
y="39"
width="174"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{START_DATE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="253"
y="50"
width="174"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="8"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$P{END_DATE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="h:mm a" isBlankWhenNull="true" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="434"
y="1"
width="100"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="MM/dd/yyyy" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="434"
y="12"
width="100"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font size="8"/>
</textElement>
<textFieldExpression class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="18" isSplitAllowed="true" >
<staticText>
<reportElement
x="1"
y="2"
width="32"
height="15"
key="staticText-3"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font fontName="SansSerif" size="7" isBold="true" isItalic="false"/>
</textElement>
<text><![CDATA[Date]]></text>
</staticText>
<staticText>
<reportElement
x="44"
y="2"
width="40"
height="15"
key="staticText-4"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[item Code]]></text>
</staticText>
<staticText>
<reportElement
x="88"
y="2"
width="120"
height="15"
key="staticText-5"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[item Name]]></text>
</staticText>
<line direction="TopDown">
<reportElement
x="2"
y="17"
width="532"
height="0"
key="line-2"/>
<graphicElement stretchType="NoStretch"/>
</line>
<staticText>
<reportElement
x="212"
y="1"
width="30"
height="15"
key="staticText-6"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[Quantity]]></text>
</staticText>
<staticText>
<reportElement
x="248"
y="1"
width="80"
height="15"
key="staticText-7"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[From Location]]></text>
</staticText>
<staticText>
<reportElement
x="335"
y="1"
width="80"
height="15"
key="staticText-8"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[To Location]]></text>
</staticText>
<staticText>
<reportElement
x="493"
y="1"
width="40"
height="15"
key="staticText-9"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[user Name]]></text>
</staticText>
<staticText>
<reportElement
x="420"
y="1"
width="70"
height="15"
key="staticText-15"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Left">
<font size="7" isBold="true"/>
</textElement>
<text><![CDATA[Transfer Type]]></text>
</staticText>
</band>
</pageHeader>
<columnHeader>
<band height="0" isSplitAllowed="true" >
</band>
</columnHeader>
<detail>
<band height="11" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="44"
y="0"
width="40"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{itemCode}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="88"
y="0"
width="120"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{itemName}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="212"
y="0"
width="30"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.Integer"><![CDATA[$F{quantity}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="248"
y="0"
width="80"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{fromStorageLocation}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="335"
y="0"
width="80"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{toStorageLocation}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="1"
y="0"
width="40"
height="11"
key="textField-1"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{formattedBusinessDate}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="493"
y="0"
width="40"
height="11"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{username}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="420"
y="0"
width="70"
height="11"
key="textField-2"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="7"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{transferType}]]></textFieldExpression>
</textField>
</band>
</detail>
<columnFooter>
<band height="0" isSplitAllowed="true" >
</band>
</columnFooter>
<pageFooter>
<band height="27" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="325"
y="4"
width="170"
height="19"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement textAlignment="Right">
<font size="10"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None" hyperlinkTarget="Self" >
<reportElement
x="499"
y="4"
width="36"
height="19"
forecolor="#000000"
backcolor="#FFFFFF"
key="textField"/>
<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>
<textElement>
<font size="10"/>
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["" + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<line direction="TopDown">
<reportElement
x="0"
y="3"
width="535"
height="0"
key="line"/>
<graphicElement stretchType="NoStretch"/>
</line>
</band>
</pageFooter>
<summary>
<band height="0" isSplitAllowed="true" >
</band>
</summary>
</jasperReport>

Link to comment
Share on other sites

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