Jump to content

Last page of 1st subreport PAGE_NUMBER=null


Recommended Posts

By: Raj - rajs1

Last page of 1st subreport PAGE_NUMBER=null

2003-03-20 04:21

My master report includes two sub report. The master report has page numbering defined in the Page Footer.

 

I noticed that the last page of the first sub report always shows

 

Page null of 8 (where 8 = total pages of the two combined reports).

 

Is this a bug? or am I doing something wrong. All other pages have correct numbering.

 

 

 

The page numbering XML in the master report is as follows:

 

<pageFooter>

<band height="20">

<!--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Page Numbering~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<line>

<reportElement x="0" y="0" width="515" height="0"/>

<graphicElement stretchType="NoStretch"/>

</line>

<textField evaluationTime="Now">

<reportElement x="200" y="0" width="80" height="15">

</reportElement>

<textElement textAlignment="Right"/>

<textFieldExpression class="java.lang.String">

"Page " + String.valueOf($V{PAGE_NUMBER}) + " of "

</textFieldExpression>

</textField>

<textField evaluationTime="Report">

<reportElement x="280" y="0" width="75" height="15">

</reportElement>

<textElement textAlignment="Left"/>

<textFieldExpression class="java.lang.String">

String.valueOf($V{PAGE_NUMBER})

</textFieldExpression>

</textField>

</band>

</pageFooter>

 

 

 

The master report has 2 sub reports defined as follows:

 

<group name="firstsubrep" isStartNewPage="true">

<groupHeader>

<band height="650">

<subreport isUsingCache="true">

<reportElement x="0" y="0" width="520" height="80" positionType="Float" isRemoveLineWhenBlank="true">

<printWhenExpression>new Boolean($P{FirstSubReportDataSource} != null)</printWhenExpression>

</reportElement>

<dataSourceExpression>

$P{BookReportDataSource}

</dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport">

$P{FirstSubReport}

</subreportExpression>

</subreport>

</band>

</groupHeader>

<groupFooter>

<band height="0"/>

</groupFooter>

</group>

 

<group name="image" isStartNewPage="true">

<groupHeader>

<band height="650">

<subreport isUsingCache="true">

<reportElement x="0" y="100" width="520" height="550" positionType="Float" isRemoveLineWhenBlank="true">

<printWhenExpression>new Boolean($P{SecondReportDataSource} != null)</printWhenExpression>

</reportElement>

<dataSourceExpression>

$P{ImageReportDataSource}

</dataSourceExpression>

<subreportExpression class="dori.jasper.engine.JasperReport">

$P{SecondSubReport}

</subreportExpression>

</subreport>

</band>

</groupHeader>

<groupFooter>

<band height="0"/>

</groupFooter>

</group>

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