0

I need a particular type of report which I could not find in core or extended reports.

So I thought of modifying the core report PHP and place it in custom PHP directory. I have manage to add "payment instrument" filter to this particular report.

        'payment_instrument_id' => array(
        'title' => ts('Payment Instrument'),
        'type' => CRM_Utils_Type::T_INT,
        'operatorType' => CRM_Report_Form::OP_MULTISELECT,
        'options' => CRM_Contribute_PseudoConstant::paymentInstrument(),
      ),

However, I need to add another item to the group to filter the result limited to recurring contribution. It could be a checkbox or a Yes/No. Can anyone suggest how can I add it please? Thanks

1 Answer 1

2

Over-riding core file would be last thing we should do unless there are no other option, since you need to port the file in each incremental upgrade.

Instead I would do one of the below

  1. To add filtes, fields etc to report i would implement hook_civicrm_alterReportVar via extension or module or plugin

  2. If the requirement is too complex than i would create new report file extending Repeat Contribution report(see example)

Your Answer

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

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