From c79b34870b230938279079effc210f3deda3c519 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Sat, 1 Apr 2017 12:58:15 -0400 Subject: [PATCH] CRM-20368 case demographic report --- CRM/Report/Form/Case/Demographics.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/CRM/Report/Form/Case/Demographics.php b/CRM/Report/Form/Case/Demographics.php index 795c455578..22c0d33b2c 100644 --- a/CRM/Report/Form/Case/Demographics.php +++ b/CRM/Report/Form/Case/Demographics.php @@ -97,6 +97,13 @@ class CRM_Report_Form_Case_Demographics extends CRM_Report_Form { 'no_display' => TRUE, ), ), + 'order_bys' => array( + 'sort_name' => array( + 'title' => ts('Contact Name'), + 'default_weight' => '1', + 'dbAlias' => 'civicrm_contact_sort_name', + ), + ), 'grouping' => 'contact-fields', ), 'civicrm_email' => array( @@ -188,6 +195,13 @@ class CRM_Report_Form_Case_Demographics extends CRM_Report_Form { 'operatorType' => CRM_Report_Form::OP_DATE, ), ), + 'order_bys' => array( + 'id' => array( + 'title' => ts('Case ID'), + 'default_weight' => '2', + 'dbAlias' => 'civicrm_case_id', + ), + ), ), ); @@ -371,10 +385,6 @@ where (cg.extends='Contact' OR cg.extends='Individual' OR cg.extends_entity_colu $this->_groupBy = CRM_Contact_BAO_Query::getGroupByFromSelectColumns($this->_selectClauses, $groupBy); } - public function orderBy() { - $this->_orderBy = "ORDER BY {$this->_aliases['civicrm_contact']}.sort_name, {$this->_aliases['civicrm_contact']}.id, {$this->_aliases['civicrm_case']}.id"; - } - public function postProcess() { $this->beginPostProcess(); -- 2.25.1