From 116fb0d8626dec3743634b1b64d1beab4e5042a8 Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Fri, 22 Feb 2019 12:59:15 -0500 Subject: [PATCH] reporting-11 - fix Soft Credit report with full group by --- CRM/Report/Form/Contribute/SoftCredit.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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); -- 2.25.1