Is it possible (via extension perhaps) to get a custom field from a related contribution record to be included in a Event Report ? For example, in a paid event registration, this would create a associated contribution record and a custom field created in the contribution record. How can I do a Event report which will include the Contribution record custom field ? the current Report function doesn't seem to allow that. Thanks.

  • Please clarify the name of the report template you're using? Oct 28, 2019 at 12:12
  • Actually no particular Event Report template, it seems that all of them does not allow for custom fields of the associated Contribution Record to be included in the report. Thanks. Oct 29, 2019 at 8:54

2 Answers 2


If you have a report that doesn't show the custom fields on an entity, it might be because those fields are not configured as searchable (yes, a very non-obvious thing). If that's the issue, then it's the same as this question/answer: Custom fields in the Report Templates

Alternatively, if it's a problem with the report itself, you can generally hack it with something like the below at the top of the class file:

 protected $_customGroupExtends = array(

If you're seeing some custom fields but not the ones for Contributions, just adding in the Contribution entry to your current values should work.


If you open the file that provides the report, you can generally add the custom fields with a single line.

For instance, if you're using Extended Reports extension, the "Extended Report - Participant Line Items" report template is a good one to add contribution custom fields to.

So, for instance, find the files for Extended Report. You can find their server location thusly:

  • Go to Administer menu » System Settings » Extensions.
  • Click the triangle next to ExtendedReport to see expanded info (see screenshot).
  • Note the local path listed.

On your server, go to that folder, then navigate to the subfolder CRM/Extendedreport/Form/Report/Event and open the ParticipantExtended.php file.

You'll see this at the top (line 15):

  protected $_customGroupExtends = array(

Insert 'Contribution', anywhere inside those parentheses (e.g. after 'Event',) save, and reload the report. You should have contribution custom fields.

This change will be overwritten when you upgrade Extended Reports - but if you test it, it works, and you believe it's a useful addition, ping me on chat.civicrm.org (name in my bio) and I'll submit it to the author as an improvement.

  • Thanks, i just checked Extended Report Extesion (v4.5) on CIVICRM (5.13.5, Wordpress 5.0) and it looks like it shows the custom fields for Contacts and Participants Record but not the Contribution Records. :( . Or am i missing something ? Thanks. Oct 30, 2019 at 2:03
  • Ah, you're right. I'll update this answer. Oct 30, 2019 at 20:00
  • I also see that Alan provided the same answer in not as many words :) Oct 30, 2019 at 20:09
  • Thanks to all. I have tried as Jon's suggestion and the custom fields appeared in Extended Report - Participant Template instead of the Extended Report - Participant Line Items template. However, when i was trying to gen a report with the Participant Template to show the said custom field, it would complain of a DB Error. Thanks for any further advice. Nov 5, 2019 at 3:58
  • That sounds like a separate issue. Enable debugging/backtrace, trigger the DB error, and open a new question that includes both the error and backtrace? Nov 12, 2019 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.