/** * Exibe parâmetros no cabeçalho do relatório */ protected function _printParams() { if ($this->_options['advanced']['printParams'] !== '0') { $params = array(); if (method_exists($this->_mapper, 'getParamsToReport')) { $params = $this->_mapper->getParamsToReport(); } if ($this->_options['advanced']['orientation'] == 'P') { $_width = 610; } else { $_width = 1070; } if ($params) { foreach ($params as $param) { $_cell = new ZendT_Report_Cell(); $_cell->setValue($param['title'] . ': ' . $param['value']); $_cell->setWidth($_width); $_cell->setTextAlign('left'); $_cell->setType('string'); $_cell->setFontWeight(true); $_cell->setFontSize($this->_fontSize); $this->_report->addCell($_cell); $this->_report->printCells(); } #$this->_report->drawLine(); } if (count($this->_labelFilters) > 0) { foreach ($this->_labelFilters as $label) { $_cell = new ZendT_Report_Cell(); $label['value'] = new ZendT_Type_String($label['value']); $_cell->setValue($label['field'] . ' ' . $label['operation'] . ' ' . str_replace('%', ' ', $label['value']->get())); $_cell->setWidth($_width); $_cell->setTextAlign('left'); $_cell->setType('string'); $_cell->setFontWeight(true); $_cell->setFontSize($this->_fontSize); $this->_report->addCell($_cell); $this->_report->printCells(); } $this->_report->ln(); } } }
/** * Adiciona uma nova celula a tabela * @param ZendT_Report_Cell $cell * @return \ZendT_Report_Xls */ public function addCell(ZendT_Report_Cell $cell) { if ($this->_rows < 1) { if ($cell->getType() == '') { $cell->setType('Title'); } } $cell->setTaStyle($this->_checkStyle($cell)); $this->_cells[] = $cell; if (count($this->_cells) > $this->_numColumns) { $this->_numColumns = count($this->_cells); $this->_columns = ''; foreach ($this->_cells as $key => $cell) { $this->_columns .= '<Column ss:AutoFitWidth="0" ss:Width="'; if ($cell->getWidth() > 0) { if ($key == 0 && $cell->getWidth() < 170) { $this->_columns .= '170'; } else { $this->_columns .= $cell->getWidth(); } } else { $this->_columns .= '170'; } $this->_columns .= '"'; if ($cell->getColspan() > 0) { $this->_columns .= ' ss:MergeAcross="' . $cell->getColspan() . '"'; } $this->_columns .= '/>' . "\n"; } } return $this; }