From: Jon Goldberg Date: Fri, 22 Feb 2019 17:59:15 +0000 (-0500) Subject: reporting-11 - fix Soft Credit report with full group by X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=116fb0d8626dec3743634b1b64d1beab4e5042a8;p=civicrm-core.git reporting-11 - fix Soft Credit report with full group by --- diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 983d479512..5296451542 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -535,21 +535,10 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency $this->buildACLClause(array('constituentname', 'contact_civireport')); $sql = $this->buildQuery(); - $dao = CRM_Core_DAO::executeQuery($sql); $rows = $graphRows = array(); - $count = 0; - while ($dao->fetch()) { - $row = array(); - foreach ($this->_columnHeaders as $key => $value) { - $row[$key] = $dao->$key; - } - $rows[] = $row; - } - $this->formatDisplay($rows); + $this->buildRows($sql, $rows); - // to hide the contact ID field from getting displayed - unset($this->_columnHeaders['civicrm_contact_id_constituent']); - unset($this->_columnHeaders['civicrm_contact_id_creditor']); + $this->formatDisplay($rows); // assign variables to templates $this->doTemplateAssignment($rows);