I would like to create one text field that contains Page X of Y
, without splitting it in two parts, as per the common solution. My textfield contains \"Pa
This work for my (little different of Dave's Answer)
*Using JasperSoft Studio
Then put a Text field with the expression:
"Pág. " + $V{PAGE_NUMBER} +"/" + $V{V_CURRENT_PAGE_NUMBER}
Hope this help!
This should help, by using evaluationTime as Report
<textField>
<reportElement x="497" y="0" width="32" height="12" forecolor="#7E8083"
uuid="ef663cfd-4058-40bb-a6d9-de7f9a8164be"/> --update your elements here
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="7" pdfFontName="OpenSans-Regular.ttf"/>
</textElement>
<textFieldExpression>
<![CDATA["Page " + $V{PAGE_NUMBER} + " of"]]>
</textFieldExpression>
</textField>
<textField evaluationTime="Report">
<reportElement x="529" y="0" width="7" height="12" forecolor="#7E8083"
uuid="ef663cfd-4058-40bb-a6d9-de7f9a8164be"/> --update your elements here
<textElement textAlignment="Right" verticalAlignment="Middle">
<font fontName="SansSerif" size="7" pdfFontName="OpenSans-Regular.ttf"/>
</textElement>
<textFieldExpression>
<![CDATA[$V{PAGE_NUMBER}]]>
</textFieldExpression>
</textField>