How to paginate HTML exported report

I would like to show one page at time of my exported HTML report. Using the page naviation controls in my page, the user would be able to view other pages of the report.

I think it is possible to get one page of the report at a time by giving JRExporterParameter.PAGE_INDEX

My question is how do we find the max page?

tia
cheeka's picture
4
Joined: Jul 18 2006 - 6:52pm
Last seen: 16 years 10 months ago

2 Answers:

Hi,

What you need is shown in our /demo/samples/webapp sample provided with the project distribution files.
There is a "Page by Page" viewer for HTML.
The total number of pages for a JasperPrint document can be obtained by calling

Code:
<br />
jasperPrint.getPages().size()<br />
</td></tr></tbody></table><br />
<br />
I hope this helps.<br />
Teodor
teodord's picture
47368
Joined: Jun 30 2006 - 9:00am
Last seen: 20 hours 29 min ago
How would I get the total number of pages through PHP?
derek_ricca's picture
Joined: Jul 29 2007 - 11:57pm
Last seen: 15 years 10 months ago
Feedback
randomness