What's Up with CiviReport?

Publié
2007-08-20 17:22
Written by
Okay, so 1.8 stable has been released - and the roadmap indicates that it includes CiviReport Phase 1. You may be wondering... How does it work? What does it do? How can I try it out? etc.... First, CiviReport isn't really a new component in CiviCRM. Rather, it's a set of sample reports which we've built on an open-sourced reporting engine called BIRT (Business Information Reporting Tool). The reports use SQL queries to interact with your CiviCRM database. There is (as of yet) no application or code-level integration between BIRT and CiviCRM. The report files are BIRT-formatted XML files which are developed using BIRT's Report Designer and "run" using BIRT's runtime engine. I've been spending free cycles the past month exploring BIRT. I don't expect to become an expert in this tool anytime soon - but my goal has been to learn enough to be a bit dangerous. More importantly, in collaboration with Kurund and Abilasha from our India team, we've learned enough to put examples of a variety of useful techniques into the Sample Reports which are included in 1.8 stable. The good news is that I've found the tool to be incredibly powerful. This is also the bad news :-( There's a lot to learn - and some bugginess which makes the learning curve a bit more frustrating. Building reports with BIRT is a "cross-disciplinary" activity. It helps to have a decent background in:
  • constructing SQL queries
  • HTML and CSS
  • Javascript
  • and... some information architecture / UI / graphic design skills don't hurt either
With a smattering of the above, some decent examples (which we've pulling together for 1.8 final), and perhaps most importantly a good book - there's a LOT of cool stuff you can do. So... I found a decent book (although it's not yet been updated to the latest 2.2 version): BIRT A Field Guide to Reporting from Addison Wesley. Some useful recent "discoveries" which are included in the sample reports:
  • Using Highlights to differentiate rows with special values. EXAMPLE: In the Participants by Status report, I wanted to differentiate Cancelled registrations. Using the Highlights Tab in the Property Editor on the "detail row" of my report - I set a font color of red based on the expression row["STATUS"] Equal to 'Cancelled'. Voila - cancelled registrations show in red.
  • Creating LINKS from report elements to CiviCRM screens. EXAMPLE: In the Membership Expiration Report I wanted to include link from the members' names to their Contact Summary screen in CiviCRM. I used the Format String - URI option to create an expression which appends the row's contact ID to my CiviCRM site contact summary URL.
Some things I'm trying to figure out (chime in here if anyone out there has ideas / solutions):
  • Improved error trapping for input parameters (i.e. invalid date formats etc.)
  • A good way to store global variables / preferences for a CiviCRM install - especially the CIVICRM_UF_BASEURL - to facilitate linking from report rows to CiviCRM screens.
Hopefully some of you will be enticed to start playing with BIRT, and contribute back new reports and improvements to the sample reports we've included in 1.8. We'd love to see lots of folks with reporting needs out there collaborating to build an impressive "library" of useful reports. To facilitate that - we've included a Contributed Reports section on the wiki where you can easily upload and share new and revised reports. We will also be continuing our explorations and posting back here periodically. We're also looking forward to being able to include reports in the public demo - once we get settled in our new hosting space. Stay tuned...