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

The first page is blank! Why?


sestopompeo

Recommended Posts

When I execute this report the first page is blank. Someone knows why this?

TIA

 

[bEGIN]

 

<?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="StampaScheda"

columnCount="1"

printOrder="Vertical"

orientation="Landscape"

pageWidth="359"

pageHeight="215"

columnWidth="331"

columnSpacing="0"

leftMargin="14"

rightMargin="14"

topMargin="14"

bottomMargin="14"

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.*" />

 

 

<field name="Intestazione" class="java.lang.String"/>

<field name="CONTINUA" class="java.lang.String"/>

<field name="SEGUE" class="java.lang.String"/>

<field name="Testo" class="java.lang.String"/>

 

<variable name="RECORD_OVERFLOW" class="java.lang.Integer" resetType="None" incrementType="Report" calculation="Nothing">

<variableExpression><![CDATA[$V{PAGE_NUMBER}]]></variableExpression>

</variable>

<background>

<band height="0" isSplitAllowed="true" >

</band>

</background>

<title>

<band height="0" isSplitAllowed="true" >

</band>

</title>

<pageHeader>

<band height="38" isSplitAllowed="true" >

<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true" evaluationTime="Page" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="2"

y="1"

width="324"

height="13"

key="textField-3"

isRemoveLineWhenBlank="true"

isPrintWhenDetailOverflows="true"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font fontName="Times New Roman" pdfFontName="Times-Roman" size="9" isPdfEmbedded ="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["Titolo della scheda"]]></textFieldExpression>

</textField>

<staticText>

<reportElement

x="109"

y="13"

width="61"

height="18"

key="staticText-2">

<printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}.intValue() >1)]]></printWhenExpression>

</reportElement>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font pdfFontName="Helvetica-Bold" isBold="true"/>

</textElement>

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

</staticText>

</band>

</pageHeader>

<columnHeader>

<band height="0" isSplitAllowed="true" >

</band>

</columnHeader>

<detail>

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

<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" >

<reportElement

x="2"

y="1"

width="324"

height="13"

key="textField-5"

isPrintRepeatedValues="false"

isPrintWhenDetailOverflows="true"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font fontName="Times New Roman" pdfFontName="Times-Roman" size="9" isPdfEmbedded ="true"/>

</textElement>

<textFieldExpression class="java.lang.String"><![CDATA["TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO TESTO MOLTO LUNGO "]]></textFieldExpression>

</textField>

</band>

</detail>

<columnFooter>

<band height="0" isSplitAllowed="true" >

</band>

</columnFooter>

<pageFooter>

<band height="36" isSplitAllowed="true" >

<staticText>

<reportElement

x="110"

y="6"

width="215"

height="24"

key="staticText-1">

<printWhenExpression><![CDATA[new Boolean($V{PAGE_NUMBER}!=(new Integer(1)))]]></printWhenExpression>

</reportElement>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font pdfFontName="Helvetica-Bold" isBold="true"/>

</textElement>

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

</staticText>

</band>

</pageFooter>

<lastPageFooter>

<band height="11" isSplitAllowed="true" >

<staticText>

<reportElement

x="10"

y="5"

width="107"

height="5"

key="staticText-3"/>

<box topBorder="None" topBorderColor="#000000" leftBorder="None" leftBorderColor="#000000" rightBorder="None" rightBorderColor="#000000" bottomBorder="None" bottomBorderColor="#000000"/>

<textElement>

<font/>

</textElement>

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

</staticText>

</band>

</lastPageFooter>

<summary>

<band height="0" isSplitAllowed="true" >

</band>

</summary>

</jasperReport>

[file name=StampaScheda.jrxml size=5894]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/StampaScheda.jrxml[/file]

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

sestopompeo,

 

Hi there!

Take a look at the code of your detail band.

You have the following properties:

band height="26"
isSplitAllowed="false"

Note that you have lengthy text in your text field which has

isStretchWithOverflow="true"

EXPLANATION:

If the contents of your textField is longger than what can fit in the detail band, isSplitAllowed="false" will cause your textField to display on the next page. At this point, iReport will display the contents of your textField AND split it into chunks that will fit the height of your detail band (currently set to a NARROW 26). :)

NOTE that isSplitAllowed="false" only affects the page that the textField is currently in - in this case, page one of your report.

If a subreport is placed inside a band which is not allowed to split due to the isSplitAllowed="false" setting, and when there is not enough space on the current page for the entire subreport to be rendered, then the engine has to give up rendering the current band, introduce a page break, and restart the band and the subreport on the next page. But since the subreport already consumed some of the supplied data source records when trying to render the band on the previous page, it needs to move the record pointer of the data source back before the first data source for the subreport to restart properly.
Source:
The JasperReports Ultimate Guide
Version 2.2
page 55

Preventing band split
In some cases it is desirable to keep whole content of a given band in one piece and to prevent page breaks that split the band when it stretches beyond its initial specified height. To do this, use the isSplitAllowed flag, which is true by default.
Source:
The JasperReports Ultimate Guide
Version 2.2
page 69

Try setting the isSplitAllowed property to "true" (lower case only).

 

I hope this helps. :)

 

 

Edwin

 

Post edited by: edwin, at: 2007/05/08 16:12

Post edited by: edwin, at: 2007/05/08 16:19

Link to comment
Share on other sites

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