maxim.troitsky Posted May 13, 2015 Posted May 13, 2015 In the Jaspersoft Studio in preview mode, report has 6 pages with the following numeration: 1/10 2/10 3/10 4/10 5/10 6/0 First parameter is PAGE_NUMBER. It's ok. Second parameter is PAGE_COUNT. It's incorrectly counts sum of pages and at the last page it reset value to zero. What could be the problem?
Tom C Posted May 15, 2015 Posted May 15, 2015 $P{PAGE_COUNT} contains the current number of records processed in the current page. If what you want is page 1 of 6, 2 of 6, ..... 6 of 6 display for the page, using two ${PAGE_NUMBER} with different evaluation time should do the trick: <pageFooter> <band height="54" splitType="Stretch"> <textField> <reportElement x="168" y="22" width="128" height="20" uuid="7d0ee7ca-0923-4c49-86c6-c0d1b888912e"/> <textElement textAlignment="Right"/> <textFieldExpression> <![CDATA["Page "+$V{PAGE_NUMBER}]]> </textFieldExpression> </textField> <textField evaluationTime="Report"> <reportElement x="296" y="22" width="100" height="20" uuid="ee21464a-dccf-491b-afa3-7c299b3108ae"/> <textFieldExpression> <![CDATA[" of "+$V{PAGE_NUMBER}]]> </textFieldExpression> </textField> </band> </pageFooter>[/code]Note:default evaluation time is Nowdefault text aligment is Left
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now