Jump to content
Changes to the Jaspersoft community edition download ×

Blank page at the end of the report


ktrinad

Recommended Posts

By: Ivan - waihunglo

Blank page at the end of the report

2002-10-22 21:32

Dear all,

Did you guys have a problem to generate a report with a blank page at the end? The total page is 6, however, all the records has been shown in 5 pages, leave page 6 is blanked. In additional, page no 6 doesn't show any page number, and total page number.

 

Thanks a lot.

 

My report is attached as follows.

 

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

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

 

<jasperReport name="DecimalFormatSample" columnCount="3" pageWidth="595" pageHeight="842" columnWidth="130" columnSpacing="15" leftMargin="20" rightMargin="20" topMargin="30" bottomMargin="30">

<parameter name="whereClause" class="java.lang.String" isForPrompting="false">

</parameter>

<queryString><![CDATA[select * from orders whereClause]]></queryString>

<field name="FREIGHT" class="java.lang.Double">

</field>

<variable name="FormatFreight" class="java.lang.String">

<variableExpression><![CDATA[new DecimalFormat("$ #,##0.0#;($ #,##0.0#)").format($F{FREIGHT}.doubleValue())

]]></variableExpression>

</variable>

<title>

<band>

</band>

</title>

<pageHeader>

<band>

</band>

</pageHeader>

<columnHeader>

<band height="14">

<staticText>

<reportElement positionType="Float" x="0" y="0" width="130" height="14"/>

<textElement textAlignment="Right">

<font fontName="Arial Bold" size="9" isBold="true"/>

</textElement>

<text><![CDATA[Freight Charge]]></text>

</staticText>

</band>

</columnHeader>

<detail>

<band height="13">

<textField>

<reportElement positionType="Float" x="0" y="0" width="130" height="13"/>

<textElement textAlignment="Right"/>

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

</textField>

</band>

</detail>

<columnFooter>

<band>

</band>

</columnFooter>

<pageFooter>

<band height="12">

<textField>

<reportElement positionType="Float" x="0" y="0" width="74" height="12"/>

<textElement/>

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

</textField>

<textField evaluationTime="Report">

<reportElement positionType="Float" x="76" y="0" width="100" height="12"/>

<textElement/>

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

</textField>

</band>

</pageFooter>

<summary>

<band>

</band>

</summary>

</jasperReport>

 

 

 

By: Teodor Danciu - teodord

RE: Blank page at the end of the report

2002-10-23 12:33

 

Hi,

 

This is caused by the summary section,

even if it contains nothing.

 

Force it to not print, like this:

 

<summary>

<band height="0">

<printWhenExpression>Boolean.FALSE</printWhenExpression>

</band>

</summary>

 

Thank you,

Teodor

 

 

 

By: Gregory A. Swarthout - gswarthout

RE: Blank page at the end of the report

2004-01-07 16:10

This worked for me at well, but feels like a kludge. My report omitted a summary section completely, but I had to add one (the one you suggested) to suppress the blank page. This feels like a bug to me.

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