CiviReport: A new reporting framework for CiviCRM

2009-05-08 13:38
Written by
One of the reported shortcomings of CiviCRM has been the perceived "lack of reporting functionality". This is true to a large extent, but our hope was that most folks would either use
  • Traditional reporting solutions: BIRT, Jasper Reports and/or Crystal Reports. We demoed an integration with BIRT a few releases back, but this did not get any traction. There are a couple of larger deployments that have built custom reports using BIRT and Jasper.
  • Views2 and CiviCRM integration. However the lack of grouping / sub-total functionality has prevented this from being a complete reporting solution. This is also a drupal only solution
  • Custom Drupal modules / Joomla components. Quite a few folks have gone down this path, but there has not been a lot of sharing of these reports within the community
Based on the success of Custom Search, we decided that shipping CiviCRM with a few good reports was a good goal for 2.3. This initiated CiviReport - The Return. The goal was to build a simple code based reporting framework that we could use to write reports fairly quickly. The same interface would be exposed so other developers could contribute their custom reports to core (in a manner similar to custom search). Deepak, Yashodha and I kicked off this project approx two weeks ago. We decided to specify and build three custom reports and get a better idea on the common themes within these reports. We chose Contribution Summary, Contribution Detail Reports and Activity Report (specified by Wes Morgan and his team at the Public Interest Network). We iterated over the process a few times and had a fairly good code interface and base class for these 3 reports. Our early work included PDF generation (thanx to dompdf) and pagination. We gave a demo of CiviReport to some users at Penguin Day. The group was quite excited and offered a lot of suggestions, requests and ideas. Chief among them was support for CSV export and inclusion of custom fields. We repeated the process at Developer Camp and also had a few indepth sessions on this. We got two more specifications: Repeat Donations Detail/Summary from Tomas at Wikimedia Foundation and a Walk List Report from Alice Aguilar at Progressive Technology Project. The Repeat Donation report is a fairly complex report and sent us back to the drawing board to restructure the code and interfaces. This discussion also made us think a lot more about linking detailed reports to summary reports, including sub-totals and making more use of group by. CiviReport has learnt quite a few things from Views2 and allows a lot more flexibility with regard to both arithmetic and string operators. We've also introduced the concept of "relative" dates and a large set of pre-defined relative date ranges (current/previous year/quarter/month/week/day) You can see a demo of the contribution reports on our sandbox server: CiviReport also has support for graphs. A contribution summary bar or pie graph can be generated quite easily

The Contribution Summary Report also links to Detailed report, for e.g 1. If one of the column is contact, then each row of that column points to detailed report for the particular contact. 2. For a group by "receive date with a monthly frequency", then the periods in each row for that column links to detailed report with all the contributions for that period. You can also see the Repeat Donation Summary and Detail reports here We are working closely with the Wikimedia foundation and Four Kitchens to improve CiviReport. The current plans calls for backporting CiviReport to the 2.2 branch with a release sometime in the next couple of months


you don't need to login to see the report

Reports will have custom permissioning. We have not yet implemented any permissioning within CiviReport but the goal is to allow the admin to set who can see what report, including volunteers or anonymous users