Jump to content
Changes to the Jaspersoft community edition download ×

Difficulties w/ isStartNewPage


2005 IR Help

Recommended Posts

By: Kurt Hansen - poidog

Difficulties w/ isStartNewPage

2004-04-14 14:04

Hi,

 

I do not seem to be understanding the usage of the isStartNewPage attribute of the element.

 

In my report (see xml below), I have three groups:

-NoGroupExpression group, with no group expression

-pageBreakNoGroupExpression, with no group expression and isStartNewPage="true"

-mainGroup, the basic group, with a group expression, surrounding the detail lines

 

I expected to see something like:

--Page Header

----NoGroupExpression group Header

--Page Footer

--Page Header - because of isStartNewPage="true"

------pageBreakNoGroupExpression group Header

--------mainGroup Header

----------detail

----------detail

--------mainGroup Footer

...

--------mainGroup Header

----------detail

----------detail

--------mainGroup Footer

--Page Footer

--Page Header

--------mainGroup Header

----------detail

----------detail

--------mainGroup Footer

...

--------mainGroup Header

----------detail

----------detail

--------mainGroup Footer

--Page Footer

 

etc.

 

But there is no page break before pageBreakNoGroupExpression.

 

What am I not understanding?

 

Thanks

 

report.xml

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

columnCount="1"

printOrder="Vertical"

orientation="Landscape"

pageWidth="1080"

pageHeight="624"

columnWidth="535"

columnSpacing="0"

leftMargin="0"

rightMargin="0"

topMargin="0"

bottomMargin="0"

whenNoDataType="AllSectionsNoDetail"

isTitleNewPage="false"

isSummaryNewPage="false">

<reportFont name="CBOEReportFont" isDefault="true" fontName="Courier" size="9" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Courier" pdfEncoding="Cp1252" isPdfEmbedded="false"/>

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

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

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

<field name="addCount" class="java.lang.Integer"/>

<variable name="firmAddCount" class="java.lang.Integer" resetType="Group" resetGroup="mainGroup" calculation="Sum">

<variableExpression>$F{addCount}</variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable>

<variable name="reportAddCount" class="java.lang.Integer" resetType="Report" calculation="Sum">

<variableExpression>$F{addCount}</variableExpression> <initialValueExpression><![CDATA[new Integer(0)]]></initialValueExpression> </variable>

<group name="NoGroupExpression" isStartNewColumn="false" isStartNewPage="false" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" >

<groupExpression></groupExpression>

<groupHeader>

<band height="12">

<staticText>

<reportElement

mode="Transparent"

x="270"

y="0"

width="60"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>GRAND Total</text>

</staticText>

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Report" hyperlinkType="None" > <reportElement

mode="Transparent"

x="330"

y="0"

width="42"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<textFieldExpression class="java.lang.Integer">$V{reportAddCount}</textFieldExpression>

</textField>

<staticText>

<reportElement

mode="Transparent"

x="6"

y="0"

width="150"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>No expression header</text>

</staticText>

</band>

</groupHeader>

<groupFooter>

<band height="0">

</band>

</groupFooter>

</group>

<group name="pageBreakNoGroupExpression" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="0" >

<groupExpression></groupExpression>

<groupHeader>

<band height="12">

<staticText>

<reportElement

mode="Transparent"

x="30"

y="0"

width="180"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text><![CDATA[Page Break - No expression Header]]></text>

</staticText>

</band>

</groupHeader>

<groupFooter>

<band height="0">

</band>

</groupFooter>

</group>

<group name="mainGroup" isStartNewColumn="false" isStartNewPage="false" isResetPageNumber="false" isReprintHeaderOnEachPage="false" minHeightToStartNewPage="48" >

<groupExpression>$F{executingFirm}</groupExpression>

<groupHeader>

<band height="12">

<staticText>

<reportElement

mode="Transparent"

x="60"

y="0"

width="120"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>group header</text>

</staticText>

</band>

</groupHeader>

<groupFooter>

<band height="12">

<staticText>

<reportElement

mode="Transparent"

x="300"

y="0"

width="30"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>TOTAL</text>

</staticText>

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" > <reportElement

mode="Transparent"

x="330"

y="0"

width="42"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<textFieldExpression class="java.lang.Integer">$V{firmAddCount}</textFieldExpression>

</textField>

<staticText>

<reportElement

mode="Transparent"

x="60"

y="0"

width="120"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>group Footer</text>

</staticText>

</band>

</groupFooter>

</group>

<background>

<band height="0">

</band>

</background>

<title>

<band height="0">

</band>

</title>

<pageHeader>

<band height="12">

<staticText>

<reportElement

mode="Transparent"

x="6"

y="0"

width="120"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>Page Header</text>

</staticText>

</band>

</pageHeader>

<columnHeader>

<band height="0">

</band>

</columnHeader>

<detail>

<band height="12">

<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" > <reportElement

mode="Transparent"

x="330"

y="0"

width="42"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<textFieldExpression class="java.lang.Integer">$F{addCount}</textFieldExpression>

</textField>

<staticText>

<reportElement

mode="Transparent"

x="90"

y="0"

width="120"

height="12"

forecolor="#000000"

backcolor="#FFFFFF"

positionType="FixRelativeToTop"

isPrintRepeatedValues="true"

isRemoveLineWhenBlank="false"

isPrintInFirstWholeBand="false"

isPrintWhenDetailOverflows="false"/>

<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">

<font reportFont="CBOEReportFont"/>

</textElement>

<text>detail</text>

</staticText>

</band>

</detail>

<columnFooter>

<band height="0">

</band>

</columnFooter>

<pageFooter>

<band height="0">

</band>

</pageFooter>

<summary>

<band height="0">

</band>

</summary>

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