custom reports for civicrm not as hard as you might think
play

Custom Reports for CiviCRM: Not as hard as you might think. Default - PowerPoint PPT Presentation

Custom Reports for CiviCRM: Not as hard as you might think. Default Linked text settings Anything. Anything Filters Grouping CiviReport does, you can do. Custom Display data columns Ordering Text Charts manipulation What you'll


  1. Custom Reports for CiviCRM: Not as hard as you might think.

  2. Default Linked text settings Anything. Anything Filters Grouping CiviReport does, you can do. Custom Display data columns Ordering Text Charts manipulation

  3. What you'll need Good grasp of SQL. Basic understanding of Object-Oriented Programming. Decent IDE. Patience.

  4. Getting started Documentation: http://bit.ly/civireport_customize

  5. Getting started Directories for custom templates and PHP files.

  6. Getting started Extending CRM_Report_Form: ● Override an existing report; OR ● Create a completely new one.

  7. Simple example: Add a column to an existing report.

  8. Simple example: Add a column to an existing report. $civicrm_root /CRM/Report/Form/Contact/Summary.php [custom_dir] /CRM/Report/Form/Contact/Summary.php

  9. Simple example: Add a column to an existing report.

  10. Simple example: Add a column to an existing report.

  11. Creating a new report “A report showing the name and phone number of everyone who came to more than one event last year.”

  12. Creating a new report

  13. Creating a new report $civicrm_root /CRM/Report/Form/Event/ ParticipantListing.php [custom_dir] /CRM/Report/Form/Event/ ParticipantAggregate.php

  14. Creating a new report

  15. Creating a new report $civicrm_root /templates/ CRM/Report/Form/Event/ ParticipantListing.tpl [custom_dir] /templates/ CRM/Report/Form/Event/ ParticipantAggregate.tpl

  16. Creating a new report Register the new report template.

  17. Creating a new report Register the new report template.

  18. Creating a new report

  19. $_columns array: 'fields': existing

  20. $_columns array: 'fields': count

  21. $_columns array: 'fields': phone

  22. $_columns array: 'fields': phone

  23. from( ) method: phone table

  24. Quick debugging tip: Print the actual report SQL to a status message, near the end of CRM_Report_Form::buildQuery( ) : CRM_Core_Session::setStatus( "<pre>$sql</pre>" );

  25. $_columns array: 'group_bys': Contact ID

  26. $_columns array: 'filters': count

  27. where( ) method

  28. where( ) method

  29. $_columns array: 'order_bys': postal code

  30. alterDisplay( ) method:

  31. Useful thing #1 Improved styles for printing reports: http://bit.ly/civireport_printstyle

  32. Useful thing #2 User-private reports: http://drupal.org/project/civicrm_private_report

  33. Last thing, lots o' fun: Charts

  34. Last thing, lots o' fun: Charts

  35. Last thing, lots o' fun: Charts

  36. Last thing, lots o' fun: Charts Examples in core reports: CRM_Report_Form_Contribute_Summary CRM_Report_Form_Contribute_Sybunt CRM_Report_Form_Contribute_Lybunt

  37. Default Linked text Grouping settings Custom Filters Ordering data Display Text Charts columns manipulation

Recommend


More recommend