示例#1
0
 function addField($label, $name, $isAggregate = false, $width = '', $format = '', $group_children_by = false, $visible = true, $hide_dups = false, $class = '', $lev_class_also = false, $label_class = '', $lev_label_class_also = false, $condition = '', $cond_class = '', $SQL_select = '', $SQL_criteria = '', $colspan = 0, $colspan_label = '', $colspan_label_class = '', $lev_colspan_class_also = false, $has_tot = false, $tot_label = '', $tot_format = '', $tot_class = '', $lev_tot_class_also = false, $link = '')
 {
     //NB every field added MUST be in the source SQL
     //if a grouping variable, then set group_children_by to True
     //if a field is an aggregate, then it must be True.  This causes it's usage to be in HAVING clause, instead of WHERE
     if ($link != "") {
         $is_link = True;
         $link_text_start = $link["link_text_start"];
         $link_text_end = $link["link_text_end"];
         $link_title_start = $link["link_title_start"];
         $link_title_end = $link["link_title_end"];
         $link_href_start = $link["link_href_start"];
         $link_href_end = $link["link_href_end"];
     } else {
         $is_link = False;
         $link_text_start = "";
         $link_text_end = "";
         $link_title_start = "";
         $link_title_end = "";
         $link_href_start = "";
         $link_href_end = "";
     }
     if ($tot_class == '') {
         $tot_class = new ReportStyle();
         $tot_class->backgroundColor(200, 200, 200);
     }
     $this->lev_fields[$name] = array("field_label" => $label, "field_name" => $name, "field_aggregate" => $isAggregate, "colspan" => $colspan, "colspan_label" => $colspan_label, "colspan_label_class" => $colspan_label_class, "lev_colspan_class_also" => $lev_colspan_class_also, "field_SQL_select" => $SQL_select, "field_SQL_criteria" => $SQL_criteria, "group_children_by" => $group_children_by, "visible" => $visible, "hide_duplicates" => $hide_dups, "field_width" => $width, "field_format" => $format, "field_class" => $class, "lev_class_also" => $lev_class_also, "field_label_class" => $label_class, "lev_label_class_also" => $lev_label_class_also, "field_condition" => $condition, "field_cond_class" => $cond_class, "has_tot" => $has_tot, "tot_label" => $tot_label, "field_tot_format" => $tot_format, "field_tot_class" => $tot_class, "lev_tot_class_also" => $lev_tot_class_also, "is_link" => $is_link, "link_text_start" => $link_text_start, "link_text_end" => $link_text_end, "link_title_start" => $link_title_start, "link_title_end" => $link_title_end, "link_href_start" => $link_href_start, "link_href_end" => $link_href_end);
 }
示例#2
0
 function setSubtitle2($t, $style = '')
 {
     if ($style == '') {
         $style = new ReportStyle();
     }
     $style->fontHeight(12);
     $style->fontFamily('arial');
     $this->rep_subtitle_2 = array($t, $style);
 }