Can you point me to resources that can cover this requirements, I'm sure it would be needed often, and whilst I can dive into working it out from first principals, as a newbie, it would be nice to get thr benefit of some starting points.

Scenario is multiple households are 'managed' by an individual rep.

I would like to produce a reported, grouped / broken by rep of all their households.

Effectively a 'responsibility list' they can use to 'tick off' their annual visit to households.

So I have set up reps as type of 'individual'

and set up an A-B relationship between rep and household.

The standard 'contact relationship' goes part way there, but for instance doesn't have address.

I can see a 'developer tab' so I am assuming I can tweak the SQL - but before I start hacking around I though I'd ask the best way to approach this.



I found this https://wiki.civicrm.org/confluence/display/CRMDOC/CiviReport+Reference the implication to me is to write a custom php report? Is that the right approach?

Seems pretty heavy weight to get the desired results - but blogs lik ethis seem to indicate it is the way to go


  • 1
    Thanks for your post. Please indicate which version of CiviCRM you are using and which CMS you are using (e.g. Drupal, WordPress or Joomla). The answers will vary depending on your CMS. Sep 13 '16 at 9:44
  • You may find the answers to this related question helpful: civicrm.stackexchange.com/questions/73/… Sep 13 '16 at 9:45

This could be a place where it's just easier for the users to use an advanced search to bring up a list of households related to their own contact record. It's definitely possible that this puts too much onus on the user for your use-case, but it really only adds a couple of clicks over pulling up a report:

Advanced Search>Relationships tab Relationship Type = your relationship from org to individual Target Contact = the reps name

This would bring up the list of households the rep has a relationship for them. There are many ways to proceed in how they may 'tick off' these households for the year depending on the org process.

If that's too much for this set of users than your "p.s." is probably on the right track and writing a custom report is the way to go here. I would not create an entire extension for this.

If you're just adding results columns, it's usually pretty painless - the documentation is just kind of all over the place. The new .tpl file is a one-liner explained in Alastair's blog post. You can copy the base report (contact relationships in this case) .php file that is closest to what you want and then copy/paste the address block columns from a different report base that has them included.

I would like to add two resources to your links above that I found helpful to put it all together when learning custom report writing for myself:




Are you on Drupal? If so, you could do that with Views.

  • Thanks for your post. It would be helpful for others if you could expand your answer with some more detail. Sep 13 '16 at 9:41
  • I'm on WordPress Sep 15 '16 at 8:47

Since you're on WordPress, Views won't help.

You could check the published extensions and see if any of those do what you need: go to https://civicrm.org/extensions and search for 'report'. Two that might be of interest are: https://civicrm.org/extensions/extended-reports and https://civicrm.org/extensions/relationship-overview-report

If none of those fit and you want to develop your own, create an extension (https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Generateaskeletalextension) and add a report (https://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension#CreateaModuleExtension-Addareport) Note that you can copy an existing report to modify.

  • I have found that There is an extended reports extension - that actually covers my initial use case of address columns. But my requirement goes further and I'm pretty certain I will have to custom code. I will post a related 'help' question relating to getting some pointers mainly on the SQL. Sep 19 '16 at 12:18

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.