function each_line($val)
 {
     reportico_report::each_line($val);
     // Set the values for the fields in the record
     $this->results["data"][$this->line_ct] = array();
     if ($this->line_ct == 0) {
         $qn = get_query_column("golap", $this->columns);
         if ($qn) {
             $arr = explode(",", $qn->column_value);
             foreach ($arr as $k => $v) {
                 $arr1 = explode("=", $v);
                 $this->results["displaylike"][$arr1[0]] = $arr1[1];
             }
         }
     }
     foreach ($this->query->display_order_set["column"] as $col) {
         $qn = get_query_column($col->query_name, $this->columns);
         $coltitle = $col->derive_attribute("column_title", $col->query_name);
         $coltitle = str_replace("_", " ", $coltitle);
         $coltitle = ucwords(strtolower($coltitle));
         $coltitle = sw_translate($coltitle);
         $disp = $col->derive_attribute("column_display", "show");
         if ($disp == "hide") {
             continue;
         }
         $this->results["data"][$this->line_ct][$coltitle] = $qn->column_value;
     }
     $this->line_ct++;
 }
예제 #2
0
 function each_line($val)
 {
     reportico_report::each_line($val);
     // Set the values for the fields in the record
     $record = array();
     foreach ($this->query->display_order_set["column"] as $col) {
         $qn = get_query_column($col->query_name, $this->columns);
         $this->results[$qn->query_name][] = $qn->column_value;
         $ct = count($this->results[$qn->query_name]);
     }
 }
 function each_line($val)
 {
     reportico_report::each_line($val);
     if ($this->page_line_count == 1) {
         //$this->text .="<tr class='swPrpCritLine'>";
         //foreach ( $this->columns as $col )
         //$this->format_column_header($col);
         //$this->text .="</tr>";
     }
     $this->soapline = array();
     foreach ($this->query->display_order_set["column"] as $col) {
         $this->format_column($col);
     }
     $this->soapdata[] = new soapval('ReportLine', 'ReportLineType', $this->soapline);
 }
 function publish()
 {
     reportico_report::publish();
     $this->debug("Publish HTML");
 }
예제 #5
0
 function each_line($val)
 {
     reportico_report::each_line($val);
     //if ( $this->line_ct > 3 ) return;
     // Set the values for the fields in the record
     $this->results[] = array("id" => $this->line_ct, "cell" => array());
     $this->results[count($this->results) - 1]["cell"][] = "options";
     // Excel requires group headers are printed as the first columns in the spreadsheet against
     // the detail.
     foreach ($this->query->groups as $name => $group) {
         if (count($group->headers) > 0) {
             foreach ($group->headers as $gphk => $col) {
                 $qn = get_query_column($col->query_name, $this->query->columns);
                 $coltitle = $col->derive_attribute("column_title", $col->query_name);
                 $coltitle = str_replace("_", " ", $coltitle);
                 $coltitle = ucwords(strtolower($coltitle));
                 $coltitle = sw_translate($coltitle);
                 if ($col->query_name == $this->key_column) {
                     $this->results[count($this->results) - 1]["id"][] = $qn->column_value;
                 }
                 $this->results[count($this->results) - 1]["cell"][] = $qn->column_value;
                 if ($this->line_ct == 0) {
                     $this->colmodel[] = array("name" => $col->query_name, "index" => $col->query_name, "editable" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "editable", false), "edittype" => "text", "sorttype" => "text", "jsonmap" => $col->query_name, "width" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "width", "80"));
                     // Map colname to col
                     $this->colmap[$col->query_name] = count($this->colmodel) - 1;
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "edittype", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["edittype"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "sorttype", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["sorttype"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "editoptions", "")) {
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"] = $v;
                     }
                     if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "filtertype", "")) {
                         if ($v == "select") {
                             $this->colmodel[count($this->colmodel) - 1]["stype"] = "select";
                             if (!$this->colmodel[count($this->colmodel) - 1]["editoptions"]) {
                                 $this->colmodel[count($this->colmodel) - 1]["editoptions"] = array();
                                 $this->colfilters[$col->query_name] = array();
                                 $this->colmodel[count($this->colmodel) - 1]["editoptions"]["value"] = ":All";
                             }
                         }
                     }
                     $this->colnames[] = $coltitle;
                 }
                 if ($this->colmodel[$this->colmap[$col->query_name]]["stype"] == "select") {
                     if (!array_key_exists($qn->column_value, $this->colfilters[$col->query_name])) {
                         //$this->colmodel[$this->colmap[$col->query_name]]["editoptions"][$qn->column_value] = $qn->column_value;
                         $this->colfilters[$col->query_name][$qn->column_value] = "1";
                         $this->colmodel[$this->colmap[$col->query_name]]["editoptions"]["value"] .= ";" . $qn->column_value . ":" . $qn->column_value;
                     }
                 }
             }
         }
     }
     foreach ($this->query->display_order_set["column"] as $col) {
         $qn = get_query_column($col->query_name, $this->columns);
         $coltitle = $col->derive_attribute("column_title", $col->query_name);
         $coltitle = str_replace("_", " ", $coltitle);
         $coltitle = ucwords(strtolower($coltitle));
         $coltitle = sw_translate($coltitle);
         if ($col->query_name == $this->key_column) {
             $this->results[count($this->results) - 1]["id"] = $qn->column_value;
         }
         $disp = $col->derive_attribute("column_display", "show");
         if ($disp == "hide") {
             continue;
         }
         if ($this->line_ct == 0) {
             $this->colmodel[] = array("name" => $col->query_name, "index" => $col->query_name, "editable" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "editable", false), "edittype" => "text", "sorttype" => "int", "jsonmap" => $col->query_name, "width" => derive_jquerygrid_col_params($this->report_name, $col->query_name, "width", "80"));
             // Map colname to col
             $this->colmap[$col->query_name] = count($this->colmodel) - 1;
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "hidden", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["hidden"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "edittype", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["edittype"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "sorttype", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["sorttype"] = $v;
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "filtertype", "")) {
                 if ($v == "select") {
                     $this->colmodel[count($this->colmodel) - 1]["stype"] = "select";
                     if (!$this->colmodel[count($this->colmodel) - 1]["editoptions"]) {
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"] = array();
                         $this->colfilters[$col->query_name] = array();
                         $this->colmodel[count($this->colmodel) - 1]["editoptions"]["value"] = ":All";
                     }
                 }
             }
             if ($v = derive_jquerygrid_col_params($this->report_name, $col->query_name, "editoptions", "")) {
                 $this->colmodel[count($this->colmodel) - 1]["editoptions"] = $v;
             }
             $this->colnames[] = $coltitle;
         }
         // Add value to filter options if type is select
         if ($this->colmodel[$this->colmap[$col->query_name]]["stype"] == "select") {
             if (!array_key_exists($qn->column_value, $this->colfilters[$col->query_name])) {
                 //$this->colmodel[$this->colmap[$col->query_name]]["editoptions"][$qn->column_value] = $qn->column_value;
                 $this->colfilters[$col->query_name][$qn->column_value] = "1";
                 $this->colmodel[$this->colmap[$col->query_name]]["editoptions"]["value"] .= ";" . $qn->column_value . ":" . $qn->column_value;
             }
         }
         $this->results[count($this->results) - 1]["cell"][] = $qn->column_value;
     }
     // $this->results[] = $cells;
     $this->line_ct++;
 }