Skip to content

Commit

Permalink
Fixed issue #7820: When exporting statistics second page of PDF is al…
Browse files Browse the repository at this point in the history
…ways blank
  • Loading branch information
c-schmitz committed May 10, 2013
1 parent b3c5790 commit c73db3b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -3312,26 +3312,23 @@ public function generate_statistics($surveyid, $allfields, $q2show='all', $usegr
}

break;

case 'pdf':

// add summary to pdf
$array = array();
//$array[] = array($statlang->gT("Results"),"");
$array[] = array($statlang->gT("Number of records in this query:",'unescaped'), $results);
$array[] = array($statlang->gT("Total records in survey:",'unescaped'), $total);

$array = array(
array($statlang->gT("Number of records in this query:",'unescaped'), $results),
array($statlang->gT("Total records in survey:",'unescaped'), $total)
);
if($total)
{
$array[] = array($statlang->gT("Percentage of total:",'unescaped'), $percent."%");

}
$this->pdf->AddPage('P', ' A4');

$this->pdf->Bookmark($statlang->gT("Results",'unescaped'), 0, 0);
$this->pdf->titleintopdf($statlang->gT("Results",'unescaped'),$statlang->gT("Survey",'unescaped')." ".$surveyid);
$this->pdf->tableintopdf($array);

$this->pdf->AddPage('P','A4');

break;

case 'html':

$statisticsoutput .= "<br />\n<table class='statisticssummary' >\n"
Expand Down

0 comments on commit c73db3b

Please sign in to comment.