I've created a site using Drupal (7.37) and CiviCRM (4.6.2) for a club that I am a member of. We send out a quarterly printed newsletter and sometimes need to insert personalised letters or other items for specific members. I can print the labels but I cannot see a way to control the order in which they come out, meaning that it is a nightmare to match up labels and inserts.

My label sheets come out in the order they were added to the database (ID field) and I'd like them in last name or even membership number (a custom field) order. Additionally the page of printed labels fills the left column, then middle column, then right column when I'd like them alphabetically filling the top row, second row, then third etc.

Is any of this possible?

2 Answers 2


It is complicated to add a sort order on address labels. I think it is possible to add a sort order to your search and that sort order is used in printing labels.

However, in a recent project, we dealt with the exact problem and using the search did not do the trick. I don't know why anymmore. But we solved the problem by creating a custom report template which they are using for their address labels.

You can find an example of such a report at https://github.com/SPnl/nl.sp.bezorggebieden/blob/master/CRM/Bezorggebieden/Form/Report/Tribune/AddressLabel.php#L251 I have added a line marker that is where the processing of the report to PDF starts. This address label report has additional features such as starting on a new page as soon as a switch of a local chapter starts. (This organisation sends sheets with address labels to local chapters).

  • 1
    Thanks for the pointer. Have taken a first look at this but evidently need to do a lot more reading about report templates before working out how to apply this solution! May 18, 2015 at 22:30

you can generate a profile (https://docs.civicrm.org/user/en/4.6/organising-your-data/profiles/) and every field you add to the profile is later sortable. check "search-form" under the option "use for". after creating the profile you go to advance search and under "Search views" you can chose the profile you created.

Important: only select fields from type Contact. If not, the profile wont be listed under advance search.

  • The last bit is what kills this as a solution for me. I need to sort by membership type as well as by various contact fields, which it won't let me do :( Jan 3, 2017 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.