AndreasK Posted February 12, 2020 Share Posted February 12, 2020 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 More sharing options...
Solution narcism Posted February 13, 2020 Solution Share Posted February 13, 2020 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 More sharing options...
AndreasK Posted February 14, 2020 Author Share Posted February 14, 2020 Thanks a lot @narcism, that was exactly what I'm looking for. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now