I have created some custom fields for Contacts and want to display these fields in a membership report that we call member mailing list. However I am unable to see the custom fields for Contacts as display columns in the report even though they are marked as searchable
If you can open the report file from your codebase, you can add the entity name to the
_customGroupExtends variable array initialized at the top of the file of almost every report in CiviCRM.
protected $_customGroupExtends = array('Contact');
The above line will include all contact custom set in your report. You can add
Membership to display custom group extending these entities too.
To see which file is used for the report, you can refresh the result to get a
Developer tab which contains the class name used to display the result.
So the file which is used in above report is -
Look for custom fields in a fieldset below the ‘standard’ report fields - here’s an example for another type of report - but clearly shows the custom data sets (if they have been marked searchable in the custom data set configuration) as fieldsets in the report - click them open and you’ll see the custom fileds
Second thought: Extended Report extension: https://civicrm.org/extensions/extended-reports - you can download/install it from your Manage Extensions screen. It introduces a number of report templates - some of which will have many customfields extended (in fieldsets) so no core code edit required.