2

Is it possible to select a location type for default contact reports, or is it just hard-coded to use the Primary address/email/phone? Also, would it be possible to list a report with multiple email addresses or phone numbers (e.g. a column for Home, Work, etc.)?

2

Can't comment on CiviReports, but I know my way around Drupal Views enough to suggest that as an alternative option since it allows you to specify for each field/column which Location Type to use for the phone, email etc

And to ensure you only see a single row for John even if he has multiple Work Phones it looks like there are two approaches.

Views Merge Rows module (not tried it) or

Views Field View which requires you to create a separate View display for each phone type/location and then insert that as a column, so eg for Home Phone it would give you a list of all the person's home phone in the one cell - but that adds a fair bit of work if you have to do it for many variations of phone/email v home/work etc, ie one view display per combination so the first option might be the better one to try

  • This could potentially be an option but we occasionally have multiple email addresses or phone numbers in one location type, and when that happens with Views it creates multiple rows for the same contact -- setting the View's Query Settings as "Distinct" and "Pure Distinct" doesn't seem to affect it. Do you know of a trick for this case to ensure contacts aren't repeated? – Laryn - CEDC.org Feb 10 '16 at 21:10
  • you can create a View for the phone and then insert that as a column, so eg for Home Phone it would give you a list of all the person's home phone in the one cell - think it involves the drupal.org/project/views_field_view module and in the settings specify that it is to match based on eg contact_id, but that adds a fair bit of work if you have to do it for many variations of phone/email v home/work etc, ie one view display per combination – petednz - fuzion Feb 10 '16 at 21:29
  • in case you don't get notified of the Edit i made, see above re the Views Merge Rows module which might be simpler for your needs. let us know if you try it and it helps. – petednz - fuzion Feb 10 '16 at 22:49
  • Views Merge Rows is the bomb, I was not familiar! Drupal-specific answer but works for me in this case. Thx. – Laryn - CEDC.org Feb 19 '16 at 22:30
  • cool. thx for reporting back – petednz - fuzion Feb 21 '16 at 7:28

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.