[#5565] - Total Page Count and Localization

Category:
Bug report
Priority:
High
Status:
New
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

http://jasperforge.org/plugins/espforum/view.php?
group_id=102&forumid=103&topicid=68429

This solution is a nice one when used with localisation.
msg(message, $V{CURRENT_PAGE_NUMBER}, $V{PAGE_NUMBER})
However when placed in page footer and exported to PDF current_page_number doesn't (always) increment after first page which in the end results in 'totalpage-1' of 'totalpages'.

The workaround from Michael mentioned below on the same page:
1) define variable CURRENT_PAGE_NUMBER:
Variable class: java.lang.Integer
Calculation: Nothing
Reset type: None
Variable Expression: $V{CURRENT_PAGE_NUMBER}==null ? $V{PAGE_NUMBER} : $V{PAGE_NUMBER}+1

this expression behaves different in header than in footer when exported to PDF. It appears that this is correct when placed in header and results in above bug when placed in footer....
msg($R{pages}, $V{CURRENT_PAGE_NUMBER}, $V{PAGE_NUMBER})

jamka's picture
2
Joined: Nov 24 2011 - 5:24am
Last seen: 10 years 7 months ago
Feedback