diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 6f8d36c8946b..7d323eba387e 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2750,6 +2750,9 @@ public function unselectedSectionColumns() { */ public function buildRows($sql, &$rows) { $dao = CRM_Core_DAO::executeQuery($sql); + if (stristr($this->_select, 'SQL_CALC_FOUND_ROWS')) { + $this->_rowsFound = CRM_Core_DAO::singleValueQuery('SELECT FOUND_ROWS()'); + } CRM_Core_DAO::reenableFullGroupByMode(); if (!is_array($rows)) { $rows = array();