| 
      
            Lines 692-697
          elsif ($phase eq 'Run this report'){
      
      
        Link Here
      
     | 
  
        
          | 692 | 
              my $report_id  = $input->param('reports'); | 
          692 | 
              my $report_id  = $input->param('reports'); | 
        
        
          | 693 | 
              my @sql_params = $input->multi_param('sql_params'); | 
          693 | 
              my @sql_params = $input->multi_param('sql_params'); | 
        
        
          | 694 | 
              my @param_names = $input->multi_param('param_name'); | 
          694 | 
              my @param_names = $input->multi_param('param_name'); | 
        
            
               | 
               | 
              695 | 
                  my $want_full_chart = $input->param('want_full_chart') || 0; | 
            
        
          | 695 | 
           | 
          696 | 
           | 
        
        
          | 696 | 
              # offset algorithm  | 
          697 | 
              # offset algorithm  | 
        
        
          | 697 | 
              if ($input->param('page')) { | 
          698 | 
              if ($input->param('page')) { | 
        
  
    | 
      
            Lines 829-835
          elsif ($phase eq 'Run this report'){
      
      
        Link Here
      
     | 
  
        
          | 829 | 
                      my ($sql,$header_types) = get_prepped_report( $sql, \@param_names, \@sql_params);  | 
          830 | 
                      my ($sql,$header_types) = get_prepped_report( $sql, \@param_names, \@sql_params);  | 
        
        
          | 830 | 
                      $template->param(header_types => $header_types);  | 
          831 | 
                      $template->param(header_types => $header_types);  | 
        
        
          | 831 | 
                      my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id );  | 
          832 | 
                      my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id );  | 
        
            
              | 832 | 
                          my ($sth2, $errors2) = execute_query($sql);  | 
               | 
               | 
            
        
          | 833 | 
                      my $total = nb_rows($sql) || 0;  | 
          833 | 
                      my $total = nb_rows($sql) || 0;  | 
        
        
          | 834 | 
                      unless ($sth) { | 
          834 | 
                      unless ($sth) { | 
        
        
          | 835 | 
                          die "execute_query failed to return sth for report $report_id: $sql";  | 
          835 | 
                          die "execute_query failed to return sth for report $report_id: $sql";  | 
        
  
    | 
      
            Lines 840-853
          elsif ($phase eq 'Run this report'){
      
      
        Link Here
      
     | 
  
        
          | 840 | 
                              my @cells = map { +{ cell => $_ } } @$row; | 
          840 | 
                              my @cells = map { +{ cell => $_ } } @$row; | 
        
        
          | 841 | 
                              push @rows, { cells => \@cells }; | 
          841 | 
                              push @rows, { cells => \@cells }; | 
        
        
          | 842 | 
                          }  | 
          842 | 
                          }  | 
        
          
            
              | 843 | 
                              while (my $row = $sth2->fetchrow_arrayref()) { | 
              843 | 
                              if( $want_full_chart ){ | 
            
            
              | 844 | 
                                  my @cells = map { +{ cell => $_ } } @$row; | 
              844 | 
                                  my ($sth2, $errors2) = execute_query($sql);  | 
            
            
              | 845 | 
                                  push @allrows, { cells => \@cells }; | 
              845 | 
                                  while (my $row = $sth2->fetchrow_arrayref()) { | 
            
            
               | 
               | 
              846 | 
                                      my @cells = map { +{ cell => $_ } } @$row; | 
            
            
              | 847 | 
                                      push @allrows, { cells => \@cells }; | 
            
            
              | 848 | 
                                  }  | 
            
        
          | 846 | 
                          }  | 
          849 | 
                          }  | 
        
        
          | 847 | 
                      }  | 
          850 | 
                      }  | 
        
        
          | 848 | 
           | 
          851 | 
           | 
        
        
          | 849 | 
                      my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);  | 
          852 | 
                      my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);  | 
        
          
            
              | 850 | 
                          my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit";  | 
              853 | 
                          my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit&want_full_chart=$want_full_chart";  | 
            
        
          | 851 | 
                      if (@param_names) { | 
          854 | 
                      if (@param_names) { | 
        
        
          | 852 | 
                          $url = join('&param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names); | 
          855 | 
                          $url = join('&param_name=', $url, map { URI::Escape::uri_escape_utf8($_) } @param_names); | 
        
        
          | 853 | 
                      }  | 
          856 | 
                      }  | 
        
            
              | 854 | 
              -   | 
               | 
               |