Skip to content
Snippets Groups Projects
Verified Commit 547c3935 authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files
parent 37fb9899
No related branches found
No related tags found
No related merge requests found
...@@ -139,6 +139,11 @@ class CRM_Report_Form extends CRM_Core_Form { ...@@ -139,6 +139,11 @@ class CRM_Report_Form extends CRM_Core_Form {
*/ */
protected $_groupFilter = FALSE; protected $_groupFilter = FALSE;
/**
* Required for civiexportexcel.
*/
public $supportsExportExcel = TRUE;
/** /**
* Has the report been optimised for group filtering. * Has the report been optimised for group filtering.
* *
...@@ -1416,7 +1421,7 @@ class CRM_Report_Form extends CRM_Core_Form { ...@@ -1416,7 +1421,7 @@ class CRM_Report_Form extends CRM_Core_Form {
if (!CRM_Core_Permission::check('view report sql')) { if (!CRM_Core_Permission::check('view report sql')) {
return; return;
} }
$ignored_output_modes = ['pdf', 'csv', 'print']; $ignored_output_modes = ['pdf', 'csv', 'print', 'excel2007'];
if (in_array($this->_outputMode, $ignored_output_modes)) { if (in_array($this->_outputMode, $ignored_output_modes)) {
return; return;
} }
...@@ -2841,6 +2846,11 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND ...@@ -2841,6 +2846,11 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
$this->_absoluteUrl = TRUE; $this->_absoluteUrl = TRUE;
$this->addPaging = FALSE; $this->addPaging = FALSE;
} }
elseif ($this->_outputMode == 'excel2007') {
$printOnly = TRUE;
$this->_absoluteUrl = TRUE;
$this->addPaging = FALSE;
}
elseif ($this->_outputMode == 'group') { elseif ($this->_outputMode == 'group') {
$this->assign('outputMode', 'group'); $this->assign('outputMode', 'group');
} }
...@@ -3481,6 +3491,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND ...@@ -3481,6 +3491,9 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND
elseif ($this->_outputMode == 'csv') { elseif ($this->_outputMode == 'csv') {
CRM_Report_Utils_Report::export2csv($this, $rows); CRM_Report_Utils_Report::export2csv($this, $rows);
} }
elseif ($this->_outputMode == 'excel2007') {
CRM_CiviExportExcel_Utils_Report::export2excel2007($this, $rows);
}
elseif ($this->_outputMode == 'group') { elseif ($this->_outputMode == 'group') {
$group = $this->_params['groups']; $group = $this->_params['groups'];
$this->add2group($group); $this->add2group($group);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment