@@ -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 {