/**
  * @ignore
  */
 function do_group_footer(tabular_report_defn_group $grp)
 {
     // this method does not call the parent method
     $lines = $grp->get_footer_lines();
     if (count($lines)) {
         foreach ($lines as $line) {
             $rec = array();
             foreach ($this->report()->get_columns() as $key => $col) {
                 $val = $line->get_column_value($key);
                 $rec[$key] = $this->get_group_column_display_value($key, $grp->get_column(), $val);
             }
             $this->_rec['footers'][] = $rec;
         }
     }
     // this group has changed, go through all columns and reset this group
     foreach ($this->report()->get_columns() as $key => $col) {
         $col->reset_group($grp->get_column());
     }
 }
 /**
  * @ignore
  */
 protected function do_group_footer(tabular_report_defn_group $grp)
 {
     $lines = $grp->get_footer_lines();
     if (count($lines)) {
         $this->before_group_footer($grp);
         foreach ($lines as $line) {
             $this->before_line();
             $columns = $this->report()->get_columns();
             $keys = array_keys($columns);
             for ($col_idx = 0; $col_idx < count($keys);) {
                 $key = $keys[$col_idx];
                 $contents = null;
                 $fmt = $line->get_cell_format($key);
                 if (is_object($fmt)) {
                     $contents = $this->get_group_cell_contents($key, $grp->get_column(), $fmt->get_template(), $this->_prev_row);
                 } else {
                     // there is no format information specified in the footer line
                     // but we need to know stuff like (maybe background color, alignment, color etc)
                     // so get a format from the report
                     $fmt = $this->report()->get_column($key);
                     $contents = $this->get_group_cell_contents($key, $grp->get_column(), '', $this->_prev_row);
                 }
                 $this->draw_cell($fmt, $contents);
                 $col_idx += max(1, $fmt->get_span());
             }
             $this->after_line();
         }
         $this->after_group_footer($grp);
     }
     // this group has changed, go through all columns and reset this group
     foreach ($this->report()->get_columns() as $key => $col) {
         $col->reset_group($grp->get_column());
     }
 }