Lines 824-833
elsif ($phase eq 'Run this report'){
Link Here
|
824 |
my ($sql,$header_types) = $report->prep_report( \@param_names, \@sql_params ); |
824 |
my ($sql,$header_types) = $report->prep_report( \@param_names, \@sql_params ); |
825 |
$template->param(header_types => $header_types); |
825 |
$template->param(header_types => $header_types); |
826 |
my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id ); |
826 |
my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id ); |
827 |
my $total = nb_rows($sql) || 0; |
|
|
828 |
unless ($sth) { |
827 |
unless ($sth) { |
829 |
die "execute_query failed to return sth for report $report_id: $sql"; |
828 |
die "execute_query failed to return sth for report $report_id: $sql"; |
830 |
} else { |
829 |
} |
|
|
830 |
|
831 |
my $total = 0; |
832 |
unless ($errors) { |
833 |
$total = nb_rows($sql) || 0; |
831 |
my $headers = header_cell_loop($sth); |
834 |
my $headers = header_cell_loop($sth); |
832 |
$template->param(header_row => $headers); |
835 |
$template->param(header_row => $headers); |
833 |
while (my $row = $sth->fetchrow_arrayref()) { |
836 |
while (my $row = $sth->fetchrow_arrayref()) { |
834 |
- |
|
|