In the sorting tab for event participation reports, I can't sort by role or status. Even those these are built-in fields that it seems obvious people would want sort by, are not in the list of columns- I'm a newbie user, so I suspect it's something easy and I just don't see it??? I'd like the report to be sorted first by status, then by role, but I'd take at least one of two. Please advise, thanks!

  • Thanks for the prompt responses! So my take-home is: It's not just me missing something simple, you actually can't sort even basic event participation reports by participant role or participant event status within Civi. Sigh. As I'm not a developer, I don't understand the other options, but they look very informative and I trust others will benefit from them. – CiviLearner Jan 17 '19 at 19:47

The default reporting does not cater for sorting status and role. One way to achieve this is by writing code as Pradeep suggested. Another way is to export the report data to Excel (csv) and do the sorting in Excel.

  • +1 because the question asker described themselves as "newbie user" and this answer takes that into account. – Phil Morice Brubaker Jan 16 '19 at 17:15

Existing report in CiviCRM for participant doesn't provide sorting based on participant status and role. Probably best solution would be to add some code to implement hook_civicrm_alterReportVar through extension and define sorting fields in $var['civicrm_participant]['order_bys'] when $varType == 'columns'.



  • This answer assumes that someone could write code and understand the report class. There is no alternative. – Jaap Jansma - CiviCooP Jan 16 '19 at 7:52

Similar to Pradeep's answer, yet another option is to clone the report and modify it - see https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-report specifically civix generate:report --copy

You could then publish your report as a new extension or submit a PR to enhance the core report.

  • This looks like where I need to be headed! But I can't yet understand it In the the link [here][1], I wouldn't know where I would even type "civix generate:report --help" to activate this. I know SQL well, and will need to be doing lots of modifying to Civi's reports (or connect to the underlying data and use Access or Tableau). In order to understand these answers, is PHP what I would need to learn? (The list of [useful skills][2] is long) [1]: docs.civicrm.org/dev/en/latest/extensions/civix/… [2]: docs.civicrm.org/dev/en/latest/basics/skills – CiviLearner Jan 17 '19 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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