Reputation: 21
Referencing the page number variable in JasperReport as $V{PAGE_NUMBER}
. Of course that works fine. However, I would like this report to have a page number preceded by a letter, as in:
A-1 A-2 ... A-N
Unfortunately, this does not appear to be permitted. Even when I get the expression editor to accept an expression, it still fails to compile. Always with "cannot cast from String to Integer", or "cannot cast from Integer to String" errors, or sometimes both.
"A-".concat($V{PAGE_NUMBER}.toString())
does not work. No possible variation works, mystifyingly.
Upvotes: 1
Views: 6219
Reputation: 21
Yeah, you can't teach smart. I neglected to change the field type from Integer to String. And I was about to disparage an awesome free product. D'Oh.
Upvotes: 1