@@ -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.
...
...
@@ -466,7 +467,7 @@ class CRM_Report_Form_ActivitySummary extends CRM_Report_Form {
$this->groupBy(FALSE);
// build the query to calulate duration sum
$sql="SELECT SUM(activity_civireport.duration) as civicrm_activity_duration_total {$this->_from}{$this->_where}{$this->_groupBy}{$this->_having}{$this->_orderBy}{$this->_limit}";
$sql="SELECT SQL_CALC_FOUND_ROWS SUM(activity_civireport.duration) as civicrm_activity_duration_total {$this->_from}{$this->_where}{$this->_groupBy}{$this->_having}{$this->_orderBy}{$this->_limit}";