diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index f78e3e3c5429..205aa72af433 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -549,6 +549,9 @@ public function orderBy() { if ($this->_caseTypeNameOrderBy) { $this->_orderBy = str_replace('case_civireport.case_type_name', 'civireport_case_types.title', $this->_orderBy); + if (isset($this->_sections['civicrm_case_case_type_name'])) { + $this->_sections['civicrm_case_case_type_name']['dbAlias'] = 'civireport_case_types.title'; + } } }