CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Printing a membership roster using Merge labels for contacts w/same address
Pages: [1]

Author Topic: Printing a membership roster using Merge labels for contacts w/same address  (Read 1396 times)

sgatuva

  • Guest
Printing a membership roster using Merge labels for contacts w/same address
October 10, 2009, 04:26:21 am
I am trying to generate a nicely formatted a membership roster. Using the mailing labels, "Merge labels for contacts with the same address" I get ALMOST exactly what I want. However, it only provides the email address and phone number of the first contact. Thus, I get something like:

Bob & Sandy Smith
Their address
Bob's phone number
Bob's email address

Is there any way to get both Bob and Sandy's email addresses to print on the label?

Alternatively, I would love to see the resulting query that is being used to generate the labels so that I could use that as a starting point for creating my own custom search and output. 

I tried this:

{contact.contact_name}
{contact.street_address}
{contact.city}{, }{contact.state_province}{ }{contact.postal_code}
{contact.phone}
{contact.email}
{contact.spouse_email} <-- I added this line in the dim hopes it would work but alas... :)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Printing a membership roster using Merge labels for contacts w/same address
October 10, 2009, 10:30:08 am

1. You can modify the code here:

CRM/Contact/Form/Task/Label.php, specifically function mergeSameAddress

2. You can see the query by enabled mysql query log. An alternatively way would be to add:

define( 'CIVICRM_DAO_DEBUG', 1 );

in your settings file (which dumps a bunch of queries on screen, which is quite awful. We should fix this for 3.1 and allow admins to log all queries)

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Printing a membership roster using Merge labels for contacts w/same address

This forum was archived on 2017-11-26.