how to show multiple pages of jasper report using virtulize.js
3 Answers:
You need to use the report.pages() method. Here you have a sample http://jsfiddle.net/marianol/pu4dW/
A fiddle is worth 100000 words :)
Take a look at section 4.8 in the programming guide http://community.jaspersoft.com/documentation/v561-v560/jasperreports-server-programming-guide
visualize({ auth: { ... } }, function (v) { var report = v.report({ resource: "/public/Samples/Reports/AllAccounts", container: "#container" }); $("#previousPage").click(function() { var currentPage = report.pages() || 1; report .pages(--currentPage) .run() .fail(function(err) { alert(err); }); }); $("#nextPage").click(function() { var currentPage = report.pages() || 1; report .pages(++currentPage) .run() .fail(function(err) { alert(err); }); }); });
I have a question related to pagination in visualize.
I have one report which is rendered using iframe and have top toolbar with pagination and export options (see jasper_iframe.png)
When I convert this report to visualize,js the top tollbar is gone (see jasper_visualize.png)
My question is does Visualize.js has native support of this toolbar or we have to implement it as you describe above? Any explaination would be really appreciated