From 7b8833c36d3c534562ae178543a5dffd3c94a5b5 Mon Sep 17 00:00:00 2001 From: Vangelis Pantazis Date: Thu, 1 Dec 2016 13:02:55 +0100 Subject: [PATCH] CRM-19637 - Showing Dynamically populated Custom data options in report criteria.MySQL Query returns the results but CRM/Report/Form is unable to translate this into a label, thus returning null value on Select CustomFields, this solves this. --- CRM/Report/Form.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 8a54de487b..2e3cfa83b5 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -2055,7 +2055,12 @@ WHERE cg.extends IN ('" . implode("','", $this->_customGroupExtends) . "') AND ))) { $retValue = $value; break; + } else { + $customField['options'] = CRM_Core_BAO_CustomOption::getCustomOption($customField['id']); + $retValue = $customField['options'][$value]['label']; + break; } + case 'StateProvince': case 'Country': -- 2.25.1