Fixed fatal error 'DB Error: no such field' on Contribution detail report
authorPradeep Nayak <pradpnayak@gmail.com>
Tue, 14 Aug 2018 14:36:02 +0000 (15:36 +0100)
committerPradeep Nayak <pradpnayak@gmail.com>
Tue, 14 Aug 2018 14:36:02 +0000 (15:36 +0100)
CRM/Report/Form.php

index a5b5e448b4497df5747a3c88427127bf7cb41df0..72b7d2a22d6ff82b28f1a6c9e8883f2e705351d4 100644 (file)
@@ -5387,7 +5387,7 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a
       ),
       'age' => array(
         'title' => $options['prefix_label'] . ts('Age'),
-        'dbAlias' => 'TIMESTAMPDIFF(YEAR, ' . $tableAlias . '.birth_date, CURDATE())',
+        'dbAlias' => 'TIMESTAMPDIFF(YEAR, ' . $tableAlias . '_civireport.birth_date, CURDATE())',
         'type' => CRM_Utils_Type::T_INT,
         'is_fields' => TRUE,
       ),