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

ajaynayak

Members
  • Posts

    5
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Downloads

Posts posted by ajaynayak

  1. Hi Guys,

     
    I wish following snip of code will help you out in your situation. Before I was also struggling for the same result and I found the working way around. You just need pass parameter i.e. PAGE_NUMBER to the subreport and that can be used to show consecutive page numbers.
     
    Let me know if you find any difficulties in this.
     
    Thanks,
    Ajay
    Code:
    Main Report : Initialize Sub Report Parameter.<subreportParameter name="START_PAGE_NUMBER">	<subreportParameterExpression><![CDATA[$V{PAGE_NUMBER}]]></subreportParameterExpression></subreportParameter> SubReport:Define Parameter.<parameter name="START_PAGE_NUMBER" class="java.lang.Integer"/> Page Footer:<pageFooter>		<band height="50">			<line>				<reportElement mode="Transparent" x="0" y="0" width="831" height="1" forecolor="#000000" backcolor="#66CCFF"/>			</line>			<textField>				<reportElement x="0" y="0" width="401" height="20"/>				<textElement textAlignment="Right">					<font fontName="Arial" size="8"/>				</textElement>				<textFieldExpression><![CDATA["Page "+($V{PAGE_NUMBER} + $P{START_PAGE_NUMBER})+" of"]]></textFieldExpression>			</textField>			<textField evaluationTime="Report">				<reportElement x="401" y="0" width="431" height="20"/>				<textElement>					<font fontName="Arial" size="8"/>				</textElement>				<textFieldExpression><![CDATA[" " + ($V{PAGE_NUMBER}+ $P{START_PAGE_NUMBER})]]></textFieldExpression>			</textField>		</band>	</pageFooter>
×
×
  • Create New...