Jump to content

sudama.patidar_1

Members
  • Posts

    4
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by sudama.patidar_1

  1. I am not able to enable/disable next and previous pagination buttons. it works fine for first time but when i refine report again then it doesnt work as expected. Below is code ;

    Visualize js Code :

    reportCompleted: function (status) {
                        if(report.data().totalPages > 1){
                        $('#nextPage').removeClass('not-active');
                        }else{
                        $('#nextPage').addClass('not-active');    
                        }
                        if(report.pages() == 1){
                        $('#prevPage').addClass('not-active');        
                        }else{
                        $('#prevPage').removeClass('not-active');            
                        }
                        if(report.pages() == report.data().totalPages){
                        $('#nextPage').addClass('not-active');        
                        }
                        
                    }

    Pagination Code :

     $("#prevPage").click(function () {
                      var currentPage = report.pages() || 1;
                    report.pages(--currentPage).run()
                            .fail(function (err) {
                            });
                  
                });
                $("#nextPage").click(function () {
                    var currentPage = report.pages() || 1;
                    report.pages(++currentPage).run()
                    .fail(function (err) {
                            });
                    
                })

     

×
×
  • Create New...