Implemented Selectable Print Orientation (Portrait, Landscape) for all reports in...
[fa-stable.git] / reporting / includes / excel_report.inc
index 7d1379b43676d9bb45929b6173ac95cfed7ad060..01872157cf3654cb447f89d7bea23befac947dc0 100644 (file)
@@ -693,8 +693,16 @@ class FrontReport extends Spreadsheet_Excel_Writer_Workbook
                return ($px / $unit_offset_length);
        }       
 
+       function recalculate_cols(&$cols)
+       {
+               $factor = (user_pagesize() == "A4" ? 1.4 : 1.3);
+               foreach($cols as $key => $col)
+                       $cols[$key] = intval($col * $factor); 
+       }
+
        function End($email=0, $subject='')
        {
+               global $path_to_root;
                ++$this->y;
                for ($i = 0; $i < $this->numcols; $i++)
                        $this->sheet->writeBlank($this->y, $i, $this->formatFooter);