Jump to content
Changes to the Jaspersoft community edition download ×

Please Help!!! Random Blank spaces!!


2005 IR Help

Recommended Posts

By: Chris - joshua_dawg

Please Help!!! Random Blank spaces!!

2004-06-29 12:42

Hey, I can't figure this error out. I have a report with several sub reports. The first page prints just fine, but the second page doesn't It has a 1-2 inch white space at the bottom of the detail band before the page footer. All pages after that also have the blank space!! I have tried everything, from removing all other bands to including all other bands. Nothing works. I have messed with tons of parameters. Nothing. The space is there regardless of which subreport is on the second page. So here is my code. PLease take a second and help me if you can!!

 

Ok, here is the Main report code

 

<?xml version="1.0" encoding="UTF-8"?>

<!-- Created using an evaluation version of JasperAssistant (http://www.jasperassistant.com) -->

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd";>

 

<jasperReport name="Current" pageWidth="612" pageHeight="841" columnWidth="592" leftMargin="10" rightMargin="10" topMargin="15" bottomMargin="0">

<parameter name="Date" class="java.lang.String">

</parameter>

<parameter name="GenSubSrc" class="dori.jasper.engine.JRDataSource">

</parameter>

<parameter name="GenSub" class="dori.jasper.engine.JasperReport">

</parameter>

<parameter name="StratSubSrc" class="dori.jasper.engine.JRDataSource">

</parameter>

<parameter name="Part" class="java.lang.String">

</parameter>

<parameter name="AuthorizedAgent" class="java.lang.String">

</parameter>

<parameter name="OemOrder" class="java.lang.String">

</parameter>

<parameter name="StratSub" class="dori.jasper.engine.JasperReport">

</parameter>

<parameter name="BuildDate" class="java.lang.String">

</parameter>

<parameter name="ShipDate" class="java.lang.String">

</parameter>

<parameter name="CompSub" class="dori.jasper.engine.JasperReport">

</parameter>

<parameter name="CompSubSrc" class="dori.jasper.engine.JRDataSource">

</parameter>

<parameter name="dtDf" class="java.text.DateFormat">

</parameter>

<parameter name="tsDf" class="java.text.DateFormat">

</parameter>

<parameter name="procCodes" class="java.util.Map">

</parameter>

<parameter name="types" class="java.util.Map">

</parameter>

<parameter name="Title" class="java.lang.String">

</parameter>

<parameter name="RatSub" class="dori.jasper.engine.JasperReport">

</parameter>

<parameter name="RatSubSrc" class="dori.jasper.engine.JRDataSource">

</parameter>

<parameter name="ParSub" class="dori.jasper.engine.JasperReport">

</parameter>

<parameter name="ParSubSrc" class="dori.jasper.engine.JRDataSource">

</parameter>

<parameter name="Names" class="java.util.Map">

</parameter>

<parameter name="ShipTo" class="java.lang.String">

</parameter>

<parameter name="ServiceDate" class="java.lang.String">

</parameter>

<parameter name="ElectronicPackage" class="java.lang.String">

</parameter>

<parameter name="CompanyLocation" class="java.lang.String">

</parameter>

<field name="SerialSuffix" class="java.lang.String">

</field>

<field name="SerialPrefix" class="java.lang.String">

</field>

<title>

<band height="25">

<textField>

<reportElement positionType="Float" x="0" y="0" width="592" height="25"/>

<textElement textAlignment="Center">

<font size="18"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{Title}]]></textFieldExpression>

</textField>

</band>

</title>

<pageHeader>

<band height="20">

<rectangle>

<reportElement positionType="Float" x="0" y="0" width="592" height="18" backcolor="#c0c0c0"/>

<graphicElement/>

</rectangle>

<staticText>

<reportElement positionType="Float" x="378" y="0" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Date of Report:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="302" y="0" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{SerialSuffix}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="189" y="0" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Serial Suffix:]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="0" y="0" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Serial Prefix:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="113" y="0" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{SerialPrefix}]]></textFieldExpression>

</textField>

<textField>

<reportElement positionType="Float" x="492" y="0" width="100" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{Date}]]></textFieldExpression>

</textField>

</band>

</pageHeader>

<detail>

<band height="152">

<staticText>

<reportElement positionType="Float" mode="Opaque" x="0" y="0" width="592" height="17" forecolor="#ffffff" backcolor="#999999"/>

<textElement textAlignment="Center">

<font fontName="Times New Roman" size="13" isBold="true"/>

</textElement>

<text><![CDATA[General Information]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="492" y="53" width="100" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{CompanyLocation}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="378" y="53" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Company Location:]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="378" y="35" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Elec Pkg Number:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="492" y="35" width="100" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{ElectronicPackage}]]></textFieldExpression>

</textField>

<textField>

<reportElement positionType="Float" x="492" y="17" width="100" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{ServiceDate}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="378" y="17" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[EERS Service Date:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="302" y="17" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{BuildDate}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="189" y="17" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Build Date:]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="189" y="35" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Ship Date:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="302" y="35" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{ShipDate}]]></textFieldExpression>

</textField>

<textField>

<reportElement positionType="Float" x="302" y="53" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{ShipTo}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="189" y="53" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Ship To:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="113" y="53" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{OemOrder}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="0" y="53" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[OEM Order Number:]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="0" y="35" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Auth Service Agent:]]></text>

</staticText>

<textField>

<reportElement positionType="Float" x="113" y="35" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{AuthorizedAgent}]]></textFieldExpression>

</textField>

<textField>

<reportElement positionType="Float" x="113" y="17" width="75" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$P{Part}]]></textFieldExpression>

</textField>

<staticText>

<reportElement positionType="Float" x="0" y="17" width="112" height="18"/>

<textElement>

<font size="11"/>

</textElement>

<text><![CDATA[Engine Part Number:]]></text>

</staticText>

<subreport>

<reportElement positionType="Float" x="0" y="72" width="592" height="20" backcolor="#ff00"/>

<subreportParameter name="tsDf">

<subreportParameterExpression><![CDATA[$P{tsDf}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="types">

<subreportParameterExpression><![CDATA[$P{types}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="procCodes">

<subreportParameterExpression><![CDATA[$P{procCodes}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="dtDf">

<subreportParameterExpression><![CDATA[$P{dtDf}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[$P{CompSubSrc}]]></dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{CompSub}]]></subreportExpression>

</subreport>

<subreport>

<reportElement positionType="Float" x="0" y="92" width="592" height="20" backcolor="#8000ff"/>

<subreportParameter name="tsDf">

<subreportParameterExpression><![CDATA[$P{tsDf}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="types">

<subreportParameterExpression><![CDATA[$P{types}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="procCodes">

<subreportParameterExpression><![CDATA[$P{procCodes}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="dtDf">

<subreportParameterExpression><![CDATA[$P{dtDf}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[$P{StratSubSrc}]]></dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{StratSub}]]></subreportExpression>

</subreport>

<subreport>

<reportElement positionType="Float" x="0" y="112" width="592" height="20" backcolor="#ff80c0"/>

<subreportParameter name="dtDf">

<subreportParameterExpression><![CDATA[$P{dtDf}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[$P{RatSubSrc}]]></dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{RatSub}]]></subreportExpression>

</subreport>

<subreport>

<reportElement positionType="Float" x="0" y="132" width="592" height="20" isRemoveLineWhenBlank="true" isPrintWhenDetailOverflows="true"/>

<subreportParameter name="tsDf">

<subreportParameterExpression><![CDATA[$P{tsDf}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="procCodes">

<subreportParameterExpression><![CDATA[$P{procCodes}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="dtDf">

<subreportParameterExpression><![CDATA[$P{dtDf}]]></subreportParameterExpression>

</subreportParameter>

<subreportParameter name="Names">

<subreportParameterExpression><![CDATA[$P{Names}]]></subreportParameterExpression>

</subreportParameter>

<dataSourceExpression><![CDATA[$P{ParSubSrc}]]></dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport"><![CDATA[$P{ParSub}]]></subreportExpression>

</subreport>

</band>

</detail>

<pageFooter>

<band height="18">

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="542" y="0" width="50" height="18"/>

<textElement/>

<textFieldExpression class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>

</textField>

<line>

<reportElement positionType="Float" x="0" y="0" width="592" height="1"/>

<graphicElement/>

</line>

<textField>

<reportElement positionType="Float" x="20" y="0" width="190" height="18"/>

<textElement/>

<textFieldExpression class="java.lang.String"><![CDATA[$P{Title}]]></textFieldExpression>

</textField>

</band>

</pageFooter>

</jasperReport>

 

********************************

**********************************

********************************

**********************************

********************************

**********************************

********************************

 

Here is the code in my subreport called ParSub (.jrxml)

 

 

<?xml version="1.0" encoding="UTF-8"?>

<!-- Created using an evaluation version of JasperAssistant (http://www.jasperassistant.com) -->

<!DOCTYPE jasperReport PUBLIC "-//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd";>

 

<jasperReport name="ParSub" pageWidth="592" pageHeight="50" columnWidth="592" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">

<parameter name="tsDf" class="java.text.DateFormat">

</parameter>

<parameter name="Names" class="java.util.Map">

</parameter>

<parameter name="procCodes" class="java.util.Map">

</parameter>

<parameter name="dtDf" class="java.text.DateFormat">

</parameter>

<field name="StrategyLevel" class="java.lang.String">

</field>

<field name="UserId" class="java.lang.String">

</field>

<field name="Timestamp" class="java.util.Date">

</field>

<field name="CancelDate" class="java.util.Date">

</field>

<field name="EffectiveDate" class="java.util.Date">

</field>

<field name="Process" class="java.lang.String">

</field>

<field name="Value" class="java.lang.String">

</field>

<field name="SupplierName" class="java.lang.String">

</field>

<title>

<band height="17">

<staticText>

<reportElement positionType="Float" mode="Opaque" x="0" y="0" width="592" height="17" forecolor="#ffffff" backcolor="#999999"/>

<textElement textAlignment="Center">

<font fontName="Times New Roman" size="13" isBold="true"/>

</textElement>

<text><![CDATA[Parameter Information]]></text>

</staticText>

</band>

</title>

<columnHeader>

<band height="18">

<rectangle>

<reportElement positionType="Float" x="0" y="0" width="592" height="18" backcolor="#c0c0c0"/>

<graphicElement/>

</rectangle>

<staticText>

<reportElement positionType="Float" x="76" y="0" width="137" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[Name]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="0" y="0" width="39" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[st Lvl]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="39" y="0" width="37" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[Param]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="213" y="0" width="57" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[Value]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="270" y="0" width="49" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[Process]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="319" y="0" width="58" height="18"/>

<textElement textAlignment="Center">

<font size="12" isBold="true"/>

</textElement>

<text><![CDATA[Eff Date]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="377" y="0" width="59" height="18"/>

<textElement textAlignment="Center">

<font size="11" isBold="true"/>

</textElement>

<text><![CDATA[Cncl Date]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="436" y="0" width="49" height="18"/>

<textElement textAlignment="Center">

<font size="11" isBold="true"/>

</textElement>

<text><![CDATA[uID]]></text>

</staticText>

<staticText>

<reportElement positionType="Float" x="485" y="0" width="108" height="18"/>

<textElement textAlignment="Center">

<font size="11" isBold="true"/>

</textElement>

<text><![CDATA[Timestamp]]></text>

</staticText>

</band>

</columnHeader>

<detail>

<band height="13" isSplitAllowed="false">

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" isPrintRepeatedValues="false" x="0" y="0" width="39" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{StrategyLevel}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" x="39" y="0" width="37" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{SupplierName}]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="213" y="0" width="57" height="13" isRemoveLineWhenBlank="true"/>

<textElement>

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{Value}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" x="76" y="0" width="137" height="13" isRemoveLineWhenBlank="true"/>

<textElement>

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[((java.util.Map)$P{Names}).get($F{SupplierName})]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="270" y="0" width="49" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[((java.util.Map)$P{procCodes}).get($F{Process})]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" x="319" y="0" width="58" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[((java.text.DateFormat)$P{dtDf}).format($F{EffectiveDate})]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" x="377" y="0" width="59" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[((java.text.DateFormat)$P{dtDf}).format($F{CancelDate})]]></textFieldExpression>

</textField>

<textField isBlankWhenNull="true">

<reportElement positionType="Float" x="436" y="0" width="49" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[$F{UserId}]]></textFieldExpression>

</textField>

<textField isStretchWithOverflow="true" isBlankWhenNull="true">

<reportElement positionType="Float" x="485" y="0" width="108" height="13" isRemoveLineWhenBlank="true"/>

<textElement textAlignment="Center">

<font size="10"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA[((java.text.DateFormat)$P{tsDf}).format($F{Timestamp})]]></textFieldExpression>

</textField>

</band>

</detail>

</jasperReport>

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