Jump to content
We've recently updated our Privacy Statement, available here ×

How to toggle Report Pagination with visualize.js?


Go to solution Solved by narcism,

Recommended Posts

I want to toggle the Report Pagination in an interactive Report with Visualize.js. I have a checkbox and if this checkbox is checked, the Report should be rendered paginated. If the checkbox is unchecked, the Report should be rendered without pagination. Based on the Visualize.js Live-Sample for Pagination Events I came up with the following Idea: HTML-Snippet: Pagination Javascript-Snippet: $("#reportPagination").on("change", function() { var checkState = $(this); if(checkState.is(":checked")) reportPagination = false; else reportPagination = true; console.log("Re-Running Report with ignorePagination: " + reportPagination); report .pages(currentPage) .run({ ignorePagination: reportPagination }) .done(checkPagesConditions) .fail(function(err) { alert(err); }); }); Full Example: JSFiddle Report Pagination It did not work, the Report stays in intial pagination state (in my example it remains paginated). How can I get this to work? Greetings, Andreas
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

In this case, the ignorePagination property is read-only, so once set, it cannot be changed unless you completely rerun the report. I've altered your fiddle here: jsfiddle.

In essence, I destroy the previous instance and then reset the report reference to the new one with the ignorePagination according to the checkbox.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...