Skip to content
Snippets Groups Projects
Unverified Commit 054faaff authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #19146 from JMAConsulting/issue-2174

#2174: Activity Summary report is missing pagination
parents 2d8ba490 0afb781e
Branches
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
protected $_phoneField = FALSE;
protected $_tempTableName;
protected $_tempDurationSumTableName;
protected $totalRows;
/**
* This report has not been optimised for group filtering.
......@@ -427,6 +428,10 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
$this->_select .= ", $clause ";
}
CRM_Core_DAO::disableFullGroupByMode();
$this->totalRows = CRM_Core_DAO::singleValueQuery("SELECT COUNT(*) FROM ({$this->_select} {$this->_from} {$this->_where} {$this->_groupBy} {$this->_having} {$this->_orderBy}) temp");
CRM_Core_DAO::reenableFullGroupByMode();
if ($applyLimit && empty($this->_params['charts'])) {
$this->limit();
}
......@@ -494,6 +499,16 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
return $sql;
}
/**
* Set pager.
*
* @param int $rowCount
*/
public function setPager($rowCount = self::ROW_COUNT_LIMIT) {
$this->_rowsFound = $this->totalRows;
parent::setPager($rowCount);
}
/**
* Group the fields.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment