function start()
 {
     reportico_report::start();
     $title = $this->reporttitle;
     $this->results = array("title" => $title, "displaylike" => array(), "data" => array());
     $ct = 0;
 }
 function start()
 {
     reportico_report::start();
     $title = $this->reporttitle;
     $this->results = array("title" => $title, "timestamp" => date("Y-m-d\\TH:i:s\\Z", time()), "displaylike" => array(), "data" => array());
     $ct = 0;
 }
 function start()
 {
     // Include NuSoap Web Service PlugIn
     //require_once("nusoap.php");
     reportico_report::start();
     $this->reporttitle = $this->query->derive_attribute("ReportTitle", "Set Report Title");
     $this->debug("SOAP Start **");
 }
예제 #4
0
 function start()
 {
     reportico_report::start();
     $title = $this->reporttitle;
     $this->results = array();
     $ct = 0;
     $this->report_name = preg_replace("/\\.xml\$/", "", $this->query->xmlinput);
     $this->key_column = derive_jquerygrid_rep_params($this->report_name, "primary_key", false);
     $this->colnames[] = "Options";
     $this->colmodel[] = array("name" => "options", "index" => "options", "jsonmap" => "Options", "width" => "80");
     $this->dataonly = get_request_item("dataonly", false);
 }
 function start()
 {
     reportico_report::start();
     $this->debug("HTML Start **");
     //pdf_set_info($this->document,'Creator', 'God');
     //pdf_set_info($this->document,'Author', 'Peter');
     //pdf_set_info($this->document,'Title', 'The Title');
     $this->page_line_count = 0;
     $this->abs_top_margin = $this->abs_paging_height($this->get_attribute("TopMargin"));
     $this->abs_bottom_margin = $this->abs_paging_height($this->get_attribute("BottomMargin"));
     $this->abs_right_margin = $this->abs_paging_height($this->get_attribute("RightMargin"));
     $this->abs_left_margin = $this->abs_paging_height($this->get_attribute("LeftMargin"));
 }
예제 #6
0
 function start()
 {
     reportico_report::start();
     $this->debug("Excel Start **");
     $this->page_line_count = 0;
     // Start the web page
     if (ob_get_length() > 0) {
         ob_clean();
     }
     header("Content-type: application/octet-stream");
     $attachfile = "reportico.csv";
     if ($this->reporttitle) {
         $attachfile = preg_replace("/ /", "_", $this->reporttitle . ".csv");
     }
     header('Content-Disposition: attachment; filename=' . $attachfile);
     header("Pragma: no-cache");
     header("Expires: 0");
     $this->debug("Excel Begin Page\n");
     echo '"' . "{$this->reporttitle}" . '"';
     echo "\n";
 }
예제 #7
0
 function start()
 {
     reportico_report::start();
     $this->debug("RJSON Start **");
     $this->page_line_count = 0;
 }
예제 #8
0
 function start()
 {
     reportico_report::start();
     $this->debug("PDF Start **");
     // Set default page size, margins, fonts etc
     $this->page_line_count = 0;
     $this->fontName = $this->query->get_attribute("pdfFont");
     $this->fontSize = $this->query->get_attribute("pdfFontSize");
     $this->vsize = $this->fontSize + $this->vspace;
     $this->orientation = $this->query->get_attribute("PageOrientation");
     $this->page_type = $this->query->get_attribute("PageSize");
     if ($this->orientation == "Portrait") {
         $this->abs_page_width = $this->page_types[$this->page_type]["width"];
         $this->abs_page_height = $this->page_types[$this->page_type]["height"];
     } else {
         $this->abs_page_width = $this->page_types[$this->page_type]["height"];
         $this->abs_page_height = $this->page_types[$this->page_type]["width"];
     }
     $this->abs_top_margin = $this->abs_paging_height($this->query->get_attribute("TopMargin"));
     $this->abs_bottom_margin = $this->abs_page_height - $this->abs_paging_height($this->query->get_attribute("BottomMargin"));
     $this->abs_right_margin = $this->abs_page_width - $this->abs_paging_width($this->query->get_attribute("RightMargin"));
     $this->abs_left_margin = $this->abs_paging_width($this->query->get_attribute("LeftMargin"));
     $this->abs_print_width = $this->abs_right_margin - $this->abs_left_margin;
     $this->abs_row_left_margin = $this->abs_left_margin;
     $this->abs_col_left_margin = $this->abs_left_margin;
     $this->abs_row_right_margin = $this->abs_right_margin;
     $this->abs_col_right_margin = $this->abs_right_margin;
     $this->abs_row_width = $this->abs_print_width;
     $this->abs_columns_width = $this->abs_print_width;
     // Set up default styles
     $this->stylestack = array("border-width" => array(0 => false), "border-edges" => array(0 => ""), "padding" => array(0 => false), "border-style" => array(0 => "none"), "border-color" => array(0 => "#000000"), "font-family" => array(0 => $this->fontName), "font-size" => array(0 => $this->fontSize), "font-weight" => array(0 => false), "font-style" => array(0 => false), "color" => array(0 => "#000000"), "background-color" => array(0 => array(255, 255, 255)), "isfilling" => array(0 => false), "padding" => array(0 => 0), "margin" => array(0 => array(0, 0, 0, 0)), "margin-left" => array(0 => 0), "margin-right" => array(0 => 0), "margin-top" => array(0 => 0), "margin-bottom" => array(0 => 0), "text-align" => array(0 => false), "position" => array(0 => "relative"), "height" => array(0 => false), "width" => array(0 => false), "background-image" => array(0 => false), "type" => array(0 => "BASE"));
     if ($this->pdfDriver == "tcpdf") {
         // If font used is a Unicode Truetype font then
         // use Unicode PDF generator
         $pdf_path = find_best_location_in_include_path("tcpdf");
         require_once $pdf_path . "/tcpdf.php";
         //require_once($pdf_path."/tcpdf.php");
         $this->document = new TCPDF($this->orientations[$this->orientation], 'pt', $this->page_type, true, 'UTF-8', false);
         $this->document->setPrintHeader(false);
         //if ( !isset($this->document->CoreFonts[strtolower($this->fontName)]) )
         //if ( !isset ($this->document->fonts[strtolower($this->fontName)] ) )
         //$this->document->AddFont($this->fontName, '', $this->fontName.'.php');
         // If the font loaded is a TrueTypeUnicode font, then we wnat to
         // use UniCode PDF generator instead
         // if ( $this->document->FontType == "TrueTypeUnicode" )
         // {
         // $this->document = new UFPDF($this->orientations[$this->orientation],'pt',$this->page_type);
         // if ( !isset($this->document->CoreFonts[strtolower($this->fontName)]) )
         // if ( !isset ($this->document->fonts[strtolower($this->fontName)] ) )
         // $this->document->AddFont($this->fontName, '', $this->fontName.'.php');
         // }
     } else {
         $pdf_path = find_best_location_in_include_path("fpdf");
         require_once $pdf_path . "/fpdf.php";
         require_once $pdf_path . "/ufpdf.php";
         $this->document = new FPDF($this->orientations[$this->orientation], 'pt', $this->page_type);
         if (!isset($this->document->CoreFonts[strtolower($this->fontName)])) {
             if (!isset($this->document->fonts[strtolower($this->fontName)])) {
                 $this->document->AddFont($this->fontName, '', $this->fontName . '.php');
             }
         }
         // If the font loaded is a TrueTypeUnicode font, then we wnat to
         // use UniCode PDF generator instead
         if ($this->document->FontType == "TrueTypeUnicode") {
             $this->document = new UFPDF($this->orientations[$this->orientation], 'pt', $this->page_type);
             if (!isset($this->document->CoreFonts[strtolower($this->fontName)])) {
                 if (!isset($this->document->fonts[strtolower($this->fontName)])) {
                     $this->document->AddFont($this->fontName, '', $this->fontName . '.php');
                 }
             }
         }
     }
     $this->document->SetAutoPageBreak(false);
     $this->document->SetMargins(0, 0, 0);
     $this->document->SetCreator('Reportico');
     $this->document->SetAuthor('Reportico');
     $this->document->SetTitle($this->reporttitle);
     //$this->calculateColumnMetrics();
 }
 function start()
 {
     reportico_report::start();
     $this->debug("PDF Start **");
     // Set default page size, margins, fonts etc
     $this->page_line_count = 0;
     $this->fontName = $this->query->get_attribute("pdfFont");
     $this->fontSize = $this->query->get_attribute("pdfFontSize");
     $this->vsize = $this->fontSize + $this->vspace;
     $this->orientation = $this->query->get_attribute("PageOrientation");
     $this->page_type = $this->query->get_attribute("PageSize");
     if ($this->orientation == "Portrait") {
         $this->abs_page_width = $this->page_types[$this->page_type]["width"];
         $this->abs_page_height = $this->page_types[$this->page_type]["height"];
     } else {
         $this->abs_page_width = $this->page_types[$this->page_type]["height"];
         $this->abs_page_height = $this->page_types[$this->page_type]["width"];
     }
     $this->abs_top_margin = $this->abs_paging_height($this->query->get_attribute("TopMargin"));
     $this->abs_bottom_margin = $this->abs_page_height - $this->abs_paging_height($this->query->get_attribute("BottomMargin"));
     $this->abs_right_margin = $this->abs_page_width - $this->abs_paging_width($this->query->get_attribute("RightMargin"));
     $this->abs_left_margin = $this->abs_paging_width($this->query->get_attribute("LeftMargin"));
     // Set up default styles
     $this->stylestack = array("border-width" => array(0 => ""), "padding" => array(0 => false), "border-style" => array(0 => "none"), "border-color" => array(0 => "#000000"), "font-size" => array(0 => $this->fontSize), "color" => array(0 => "#000000"), "background-color" => array(0 => array(255, 255, 255)), "isfilling" => array(0 => false), "padding" => array(0 => 0));
     // If font used is a Unicode Truetype font then
     // use Unicode PDF generator
     $pdf_path = find_best_location_in_include_path("fpdf");
     require_once $pdf_path . "/fpdf.php";
     require_once $pdf_path . "/ufpdf.php";
     $this->document = new FPDF($this->orientations[$this->orientation], 'pt', $this->page_type);
     if (!isset($this->document->CoreFonts[strtolower($this->fontName)])) {
         if (!isset($this->document->fonts[strtolower($this->fontName)])) {
             $this->document->AddFont($this->fontName, '', $this->fontName . '.php');
         }
     }
     // If the font loaded is a TrueTypeUnicode font, then we wnat to
     // use UniCode PDF generator instead
     if ($this->document->FontType == "TrueTypeUnicode") {
         $this->document = new UFPDF($this->orientations[$this->orientation], 'pt', $this->page_type);
         if (!isset($this->document->CoreFonts[strtolower($this->fontName)])) {
             if (!isset($this->document->fonts[strtolower($this->fontName)])) {
                 $this->document->AddFont($this->fontName, '', $this->fontName . '.php');
             }
         }
     }
     $this->document->SetAutoPageBreak(false);
     $this->document->SetMargins(0, 0, 0);
     $this->document->SetCreator('Reportico');
     $this->document->SetAuthor('Reportico');
     $this->document->SetTitle($this->reporttitle);
     // Calculate column print and width poistions based on the column start attributes
     $looping = true;
     foreach ($this->query->display_order_set["column"] as $k => $w) {
         $col = get_query_column($w->query_name, $this->query->columns);
         $startcol = $col->attributes["ColumnStartPDF"];
         $colwidth = $col->attributes["ColumnWidthPDF"];
         if ($startcol) {
             $col->abs_column_start = $this->abs_paging_width($startcol);
         } else {
             $col->abs_column_start = 0;
         }
         if ($colwidth) {
             $col->abs_column_width = $this->abs_paging_width($colwidth);
         } else {
             $col->abs_column_width = 0;
         }
     }
     while ($looping) {
         $fromkey = 0;
         $nextkey = 0;
         $frompos = 0;
         $nextpos = 0;
         $topos = 0;
         $lastwidth = 0;
         $looping = false;
         $gapct = 0;
         $k = 0;
         $colct = count($this->query->display_order_set["column"]);
         $coltaken = 0;
         $colstocalc = 0;
         $colswithwidth = 0;
         foreach ($this->query->display_order_set["column"] as $k => $w) {
             if ($w->attributes["column_display"] != "show") {
                 continue;
             }
             $col = get_query_column($w->query_name, $this->query->columns);
             $startcol = $col->abs_column_start;
             $colwidth = $col->abs_column_width;
             if ($startcol) {
                 if ($frompos && $gapct) {
                     $topos = $col->abs_column_start;
                     break;
                 } else {
                     $fromkey = $k;
                     $tokey = $k;
                     $frompos = $col->abs_column_start;
                     if ($colwidth) {
                         $coltaken += $colwidth;
                         $coltaken = 0;
                         $colswithwidth = 1;
                         $colstocalc = 1;
                     } else {
                         $colstocalc++;
                         $gapct++;
                     }
                 }
                 $lastct = 0;
             } else {
                 if (!$frompos) {
                     $col->abs_column_start = $this->abs_left_margin;
                     $frompos = $col->abs_column_start;
                     $fromkey = $k;
                 }
                 if ($colwidth) {
                     $coltaken += $colwidth;
                     $colswithwidth++;
                 }
                 $colstocalc++;
                 $tokey = $k;
                 $gapct++;
                 $looping = true;
             }
         }
         if (!$gapct) {
             break;
         }
         // We have two known positions find total free space between
         $calctoend = false;
         if (!$topos) {
             $calctoend = true;
             $topos = $this->abs_right_margin;
         }
         $totwidth = $topos - $frompos;
         if ($coltaken > $totwidth) {
             $coltaken = $totwidth;
         }
         $colno = 0;
         $calccolwidth = ($totwidth - $coltaken) / ($colstocalc - $colswithwidth);
         $lastpos = $this->abs_left_margin;
         for ($ct = $fromkey; $ct <= $tokey; $ct++) {
             $col1 =& $this->query->display_order_set["column"][$ct];
             if ($col1->attributes["column_display"] == "show") {
                 $abspos = $col1->abs_column_start;
                 if (!$abspos) {
                     $col1->abs_column_start = $lastpos;
                     $colwidth = $col1->attributes["ColumnWidthPDF"];
                     if ($colwidth) {
                         $col1->abs_column_width = $this->abs_paging_width($colwidth);
                         $lastpos = $col1->abs_column_start + $col1->abs_column_width;
                     } else {
                         $col1->abs_column_width = $calccolwidth;
                         $lastpos = $col1->abs_column_start + $calccolwidth;
                     }
                 } else {
                     $colwidth = $col1->attributes["ColumnWidthPDF"];
                     if ($colwidth) {
                         $col1->abs_column_width = $this->abs_paging_width($colwidth);
                         $lastpos = $col1->abs_column_start + $col1->abs_column_width;
                     } else {
                         $col1->abs_column_width = $calccolwidth;
                         $lastpos = $col1->abs_column_start + $calccolwidth;
                     }
                 }
             }
         }
     }
 }
예제 #10
0
 function start()
 {
     reportico_report::start();
     $results = array();
     $ct = 0;
 }