Visualize: Render report with pagination
Test plugins
HTML
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
<script type='text/javascript' src="http://build-master.jaspersoft.com:5980/jrs-pro-trunk/client/visualize.js"></script>
<button id="previousPage">Previous Page</button><button id="nextPage">Next Page</button>
<div id="container"></div>
JavaScript
visualize({
auth: {
name: "superuser",
password: "superuser"
}
}, function (v) {
var report = v.report({
resource: "/public/Samples/Reports/03._Store_Segment_Performance_Report",
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); });
});
});