45
Address Labels: SuiteCRM & LibreOffice 5.1 Table of Contents 1 Introduction............................................................................................................................................... 3 1.1 Disclaimer........................................................................................................................................... 3 2 Workflow Overview.................................................................................................................................. 3 2.1 Initial Setup......................................................................................................................................... 4 2.2 Subsequent Reports............................................................................................................................ 4 3 My System Configuration......................................................................................................................... 4 4 Detail Workflow........................................................................................................................................ 5 4.1 SuiteCRM, Studio............................................................................................................................... 5 4.2 Initial SuiteCRM Setup...................................................................................................................... 5 4.2.1 SuiteCRM, Reports – Fields....................................................................................................... 5 4.2.2 SuiteCRM, Report – Conditions................................................................................................. 6 4.2.3 SuiteCRM, Report...................................................................................................................... 7 4.2.4 SuiteCRM, Report – Export........................................................................................................ 8 4.3 Initial LibreOffice Setup..................................................................................................................... 9 4.3.1 LibreOffice, Calculate............................................................................................................... 10 4.3.2 LibreOffice, Base – Import Data.............................................................................................. 12 4.3.3 LibreOffice, Base – Database Registration............................................................................... 15 4.3.4 LibreOffice, Base/Writer – Label Template.............................................................................. 19 4.3.5 LibreOffice, Writer – The Label Template............................................................................... 27 4.3.6 LibreOffice, Writer – Printing Labels....................................................................................... 29 4.4 LibreOffice Cleanup......................................................................................................................... 33 4.5 Subsequent Label Printing................................................................................................................ 34 4.5.1 SuiteCRM Subsequent Workflow............................................................................................. 34 4.5.2 LibreOffice Subsequent Label Printing.................................................................................... 34 4.5.3 Working File Cleanup............................................................................................................... 44 5 Summary................................................................................................................................................. 45 SuiteCRM_AddressLabels_Tutorial_09.odt Page 1 of 45 Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Table of Contents1 Introduction............................................................................................................................................... 3

1.1 Disclaimer........................................................................................................................................... 32 Workflow Overview.................................................................................................................................. 3

2.1 Initial Setup......................................................................................................................................... 42.2 Subsequent Reports............................................................................................................................ 4

3 My System Configuration......................................................................................................................... 44 Detail Workflow........................................................................................................................................ 5

4.1 SuiteCRM, Studio............................................................................................................................... 54.2 Initial SuiteCRM Setup...................................................................................................................... 5

4.2.1 SuiteCRM, Reports – Fields....................................................................................................... 54.2.2 SuiteCRM, Report – Conditions................................................................................................. 64.2.3 SuiteCRM, Report...................................................................................................................... 74.2.4 SuiteCRM, Report – Export........................................................................................................ 8

4.3 Initial LibreOffice Setup..................................................................................................................... 94.3.1 LibreOffice, Calculate............................................................................................................... 104.3.2 LibreOffice, Base – Import Data.............................................................................................. 124.3.3 LibreOffice, Base – Database Registration............................................................................... 154.3.4 LibreOffice, Base/Writer – Label Template.............................................................................. 194.3.5 LibreOffice, Writer – The Label Template............................................................................... 274.3.6 LibreOffice, Writer – Printing Labels....................................................................................... 29

4.4 LibreOffice Cleanup......................................................................................................................... 334.5 Subsequent Label Printing................................................................................................................ 34

4.5.1 SuiteCRM Subsequent Workflow............................................................................................. 344.5.2 LibreOffice Subsequent Label Printing.................................................................................... 344.5.3 Working File Cleanup............................................................................................................... 44

5 Summary................................................................................................................................................. 45

SuiteCRM_AddressLabels_Tutorial_09.odt Page 1 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 2: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Table of Figures Figure 1: SuiteCRM, Report – Label Report Data Fields .......................................................................... 6 Figure 2: SuiteCRM, Report – Condition Filed with Parameter Set .......................................................... 6 Figure 3: SuiteCRM, Report – Resulting Report (partial screenshot) ....................................................... 7 Figure 4: SuiteCRM, Report – Export Data ............................................................................................... 8 Figure 5: SuiteCRM, Report – Save CSV File ........................................................................................... 8 Figure 6: LibreOffice, Calculate – Import CSV File ................................................................................ 10 Figure 7: LibreOffice, Calculate – Saving the ods File ............................................................................ 11 Figure 8: LibreOffice, Base – Starting the Database Wizard ................................................................... 12 Figure 9: LibreOffice, Base – Browse to Your Working "ods" File ......................................................... 13 Figure 10: LibreOffice, Base – Tables After "ods" Import ....................................................................... 14 Figure 11: LibreOffice, Base – Registration – Tools > Options ............................................................... 15 Figure 12: LibreOffice, Base – Registration – New Database ................................................................. 16 Figure 13: LibreOffice, Base – Registration – Database – Browse to your file ....................................... 17 Figure 14: LibreOffice, Base – Registration – Database is now registered ............................................. 18 Figure 15: LibreOffice, Base – Label Wizard – Open New Label ........................................................... 19 Figure 16: LibreOffice, Base – Label Wizard – Labels Tab, source data locations and label layout ....... 20 Figure 17: LibreOffice, Base – Label Wizard – Populating Label Layout Box ....................................... 21 Figure 18: LibreOffice, Base – Label Wizard – Populated Label Layout Box ........................................ 22 Figure 19: LibreOffice, Base – Label Wizard – Default Label Layout Dimensions ................................ 24 Figure 20: LibreOffice, Base – Label Wizard – Modified Layout Dimensions & New Save Name ....... 25 Figure 21: LibreOffice, Base – Label Wizard – Options Tab – Synchronize and Printer ........................ 26 Figure 22: LibreOffice, Base – Label Wizard – New Document ............................................................. 27 Figure 23: LibreOffice, Writer – Label Template .................................................................................... 28 Figure 24: LibreOffice, Writer – Print Form Letter ................................................................................. 29 Figure 25: LibreOffice, Writer, Mail Merge Print Dialog Box ................................................................ 30 Figure 26: LibreOffice, Writer – Printed Label – partial 5 rows and 2 columns ..................................... 31 Figure 27: LibreOffice, Writer – Printed Labels – All 29 contacts .......................................................... 32 Figure 28: LibreOffice, Calculate, Saving the csv Import as ods ............................................................ 35 Figure 29: LibreOffice, Base, Opening the Calculate ods Spreadsheet ................................................... 36 Figure 30: LibreOffice, Base, Browse to Calculate ods File .................................................................... 36 Figure 31: LibreOffice, Base, Save & Register the odb Database ........................................................... 37 Figure 32: LibreOffice, Base, Saving the Database as an odb File .......................................................... 38 Figure 33: LibreOffice, Writer, Opening the Label Template, Syncing to Registered Database ............. 39 Figure 34: LibreOffice, Writer, Label Template Before Printing ............................................................. 40 Figure 35: LibreOffice, Writer, Print From Letter Dialog, Sync Label to Database ................................ 41 Figure 36: LibreOffice, Writer, Label Print Setup Window ..................................................................... 42 Figure 37: LibreOffice, Writer, Subsequent Workflow, Updated Labels ................................................. 43

SuiteCRM_AddressLabels_Tutorial_09.odt Page 2 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 3: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

1 IntroductionI have been looking for a way to create address labels (also know as mailing labels) since SuiteCRM does not provide a direct means for creating the labels. I now have a workflow that will create the labels.

• No, this is not a simple 1 or 2 click workflow to print address labels.

• Yes, this is a multi-step manual workflow.

• Yes, it does create printable address labels.

My workflow is based upon the “Alternative to Mail Merge” posting by jshaheen on the SugarCRM Community Forum, January 25, 2016.

https://community.sugarcrm.com/thread/26561

1.1 DisclaimerI offer this workflow “As Is” without any warranty. Please make a backup copy of your data before using the steps in this workflow. I have not experienced any data integrity issue with this workflow, but “Murphy’s Law” always applies.

2 Workflow OverviewThis workflow has two major phases (Initial Setup and the Subsequent Updating & Reprinting) with several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps.

• SuiteCRM, contact database, address label report, export as a csv file.

• LibreOffice, import the csv file, and manipulate the data to create the printable labels.

I had problems using LibreOffice 4.2, so it would be best to use the latest version of LibreOffice. A similar workflow should be possible with Microsoft Office or OpenOffice.

Details of the workflow with screenshots are in the Detail Workflow section of this document.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 3 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 4: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

2.1 Initial Setup• SuiteCRM, Create a custom data field in the Contact module to filter the data

• SuiteCRM, Create and save your report, then export as a csv file

• LibreOffice, Use Calculate, Base, and Writer to open the csv file and create and save the label template

• LibreOffice, Writer, Print your labels

• Your File Manger, Cleanup, Erase the working files (csv, ods and odb)

2.2 Subsequent Reports• SuiteCRM, update your data and run the report, then export as a csv file

• LibreOffice, Calculate & Base, open the csv file, save ods file, save odb file

• LibreOffice, Writer, Open the existing label template file and print your labels

• Cleanup working files

3 My System Configuration• Lenovo T510 Laptop, Intel i5 CPU, 8 GB RAM

• Dual boot Windows 7 Pro and Linux Mint 17.1

• Brother HL-5250DN Laser Printer

• My test data (the working csv, ods, odt & odb files) is saved on a shared partition so that SuiteCRM (Mint) and LibreOffice (Mint & Windows) can share the working file data.

• SuiteCRM v7.6.6 (Bitnami Stack (v7..3.2 plus upgrades) on Linux Mint)

• LibreOffice (v4.2.8 on Linux Mint, v5.1.6.2 on Windows 7 Pro). I am using both versions so that I can get the SuiteCRM screenshots on the Mint side, and the LibreOffice label workflow on the Windows side. Upgrading LibreOffice on Mint is another of my future tasks (or upgrading to a newer version of Mint).

SuiteCRM_AddressLabels_Tutorial_09.odt Page 4 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 5: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4 Detail WorkflowThe remainder of this document provides a more detailed step-by-step set of instructions for creating the address labels.

4.1 SuiteCRM, StudioI used Studio to add a custom data field, j_Xmas, with a Yes/No dropdown selection so that I could select (filter) the contacts to include in the print label report.

4.2 Initial SuiteCRM Setup

4.2.1 SuiteCRM, Reports – Fields

I used the standard SuiteCRM Report tools to create the initial report. I added the fields from the Contact module to the report template.

You may want to modify the Label Names. The shorter names will make it easier to place the data fields on the LibreOffice Writer template in a later step in this workflow.

• I suggest sorting by the last name.

• I added a Condition Field so that I could select the contacts for the address labels.

The Fields after these modification is shown below. For e.g., the First Name data field now has the label F_Name, which will appear as a header in the csv file. It is probably best to not have blank spaces in the label names.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 5 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 6: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The report column data fields.

4.2.2 SuiteCRM, Report – Conditions

The Conditions screen. Note that the “Parameter” box is checked. This allows changing the filter criteria when running the report.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 6 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 1: SuiteCRM, Report – Label Report Data Fields

Figure 2: SuiteCRM, Report – Condition Filed with Parameter Set

Page 7: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.2.3 SuiteCRM, Report

There are 29 contacts in my test database that have a “Yes” in the j_Xmas data field. The “Parameters” option on the following figure allows the selection or filter of the contacts by the Yes/No on the j_Xmas data field that I added using Studio. Also note the modified column header labels.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 7 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 3: SuiteCRM, Report – Resulting Report (partial screenshot)

Page 8: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.2.4 SuiteCRM, Report – Export

Now it is time to export this report as a csv file: Edit Tab > Export. The resulting filename will be the same as your SuiteCRM Report name.

I suggest “Save file” so that you can easily access the file again if needed. This file will most likely be in your “Download” folder. On my Linux Mint system, in is in the /Home/<userid>/Downloads folder. The “Open with” LibreOffice Calculate is another option, but you will not have the csv file available to work with in your working directory if you need to go back to the csv file.

One of the keys to this workflow is to keep consistent file names and folder locations so that the recurring printing of labels is easier.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 8 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 4: SuiteCRM, Report – Export Data

Figure 5: SuiteCRM, Report – Save CSV File

Page 9: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

You may want to create a working directory and move the csv file to this location before beginning the next steps. If you do move the csv file, then you will need to remember to move the file again in subsequent sessions so that all of your working files names and locations are consistent. The “Download”folder is not a realistic on-going location for working files. In my case, the data partition <MyData> can be accessed by both Windows and Mint. So, I moved the file to the working Mint directory path, the Windows path will be slightly different:

/Home/<userID>/<MyData>/SuiteCRM/SuiteCRM_Label_Tutorial.

The j_AddressLabels_01.csv file is now in your working directory

At this point, you have completed the initial setup of the SuiteCRM part of the workflow, and it is time to shift to the LibreOffice applications.

4.3 Initial LibreOffice SetupI will be using LibreOffice v5.1 to complete the address label workflow. I initially tried to use v4.2 on theLinux Mint installation, but I had problems with the label spacings and printing. So, I changed to using v5.1 on the Windows installation. I do not recommend using the older LibreOffice version.

The LibreOffice documentation web site has a number of articles on the topic of mail merge and address labels. A Google search for the keywords “LibreOffice”, “address”, “mailing”, “merge”, and “labels” willreturn many more results.

https://wiki.documentfoundation.org/images/3/3c/WG4211-UsingMailMerge.pdf

https://help.libreoffice.org/Common/Printing_Address_Labels

SuiteCRM_AddressLabels_Tutorial_09.odt Page 9 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 10: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.1 LibreOffice, Calculate

The LibreOffice Calculate program is used to import the csv file and save it in the ods file format for use by the Base program. File > Open

• Go to the folder location where you saved the csv file, j_AddressLabels_01.csv.

• Open and import the file using Calculate. See Figure 6: LibreOffice, Calculate – Import CSV File

• Save the file as an ods file format. See Figure 7: LibreOffice, Calculate – Saving the ods File

• Your working directory now has two files: j_AddressLabels_01.csv and j_AddressLabels_01.ods.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 10 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 6: LibreOffice, Calculate – Import CSV File

Page 11: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

SuiteCRM_AddressLabels_Tutorial_09.odt Page 11 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 7: LibreOffice, Calculate – Saving the ods File

Page 12: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.2 LibreOffice, Base – Import Data

This is the program where most of the initial setup effort is done.

Open a new Base program. If LibreOffice is already open then: File > New > Database.

This will invoke the Database Wizard. You want to select the “Connecting to an existing database” button, and select “Spreadsheet” from the dropdown list. Then click “Next”

A possible interesting aside at this point, one of the dropdown list options is MySQL. This might mean that you could query the SuiteCRM MySQL database directly, which is outside of the scope of this document.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 12 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 8: LibreOffice, Base – Starting the Database Wizard

Page 13: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The next screen allows you to browse to your working “ods” file. Locate your working “ods” file and then click “Finish”. In my case this was the j_AddressLabels_01.ods file.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 13 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 9: LibreOffice, Base – Browse to Your Working "ods" File

Page 14: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The Base program now has the table with your address label information.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 14 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 10: LibreOffice, Base – Tables After "ods" Import

Page 15: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.3 LibreOffice, Base – Database Registration

Please note that this is an important step in the workflow.

Just like in a political election, if you are not registered to vote, you will not (or should not) be able to vote. For LibreOffice, if you do not register the database, you will not be able to print labels with actual contact information and you may not realize why. You only need to register the database once if you keep consistent filename and folder locations.

The steps to register the odb database. See Figure 11, Figure 12, Figure 13, and Figure 14.

• In some cases, Base somehow recognizes that you need to register the database and presents a dialog box. Otherwise, follow the manual steps below.

• Open you odb database, in my case, j_AddressLabels_01.odb

• From the toolbar: Tools > Options > LibreOffice Base > Databases > New

• Browse to your database, double click the file name, and click OK

SuiteCRM_AddressLabels_Tutorial_09.odt Page 15 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 11: LibreOffice, Base – Registration – Tools > Options

Page 16: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Click “New”.

There may already be other databases registered on your system and they will be listed in the dialog box above.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 16 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 12: LibreOffice, Base – Registration – New Database

Page 17: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Browse to your working odb file location and select your odb file.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 17 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 13: LibreOffice, Base – Registration – Database – Browse to your file

Page 18: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Click OK to register the database.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 18 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 14: LibreOffice, Base – Registration – Database is now registered

Page 19: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.4 LibreOffice, Base/Writer – Label Template

Now we get to the part of the workflow that involves some trial-and-error effort on your part. Namely, the format spacings of your data fields onto the label template. This is the step in the workflow where I had problems using LibreOffice 4.2 and I switched to LibreOffice 5.1.

Open your working LibreOffice Base file (in my case, j_AddressLabels_01.odb).

The first step is to open the label wizard: File > New > Labels.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 19 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 15: LibreOffice, Base – Label Wizard – Open New Label

Page 20: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

This will open the label wizard dialog box which has 3 tabs: Labels, Format, and Options. We will work with all 3 tabs. We will start with the “Labels” tab.

• The database will be your working odb database that you registered in the previous setup.

• The table will be the address data table in the odb database.

• You will select database fields from the table and add them to the label text box.

• LibreOffice provides access to many label format in the selection boxes on the lower right. I am using Avery (or equivalent) 5260 labels. These are 8.5 by 11 sheets with 30 labels per sheet. If you are using a different page size such as A4, then your dimensions will be different. But, the logic should be similar.

Do not click on the New Document button until much later in these steps.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 20 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 16: LibreOffice, Base – Label Wizard – Labels Tab, source data locations and label layout

Page 21: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The next figure shows the selected fields and the beginning of data field placements into the layout box.

Select each data field one-by-one and add it to the layout box using the “Arrow” button. Notice that the database field names have the modified field names that were defined when creating the SuiteCRM report. The shorter names makes it easier to work with the layout box.

Remember to add blank spaces, comma, Enter (for end of line), or other special characters as needed to meet your requirements.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 21 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 17: LibreOffice, Base – Label Wizard – Populating Label Layout Box

Page 22: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

A summary of my data fields with blanks, comma, and EOL:

F_Name<blank>L_Name<EOL>

Alt_Street<EOL>

Alt_City<,><blank>Alt_State<blank>Alt_Zip (note, no EOL or you will get another line on the label)

The EOL characters will not show in the label text box, so make sure to enter them after the L_Name and Alt_Street entries. The blanks may or may not display depending upon the character length of the names. In my case the blanks are not obvious. You can see the “,” after the Alt_City.

Do not click the New Document Button yet.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 22 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 18: LibreOffice, Base – Label Wizard – Populated Label Layout Box

Page 23: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Now, it is time use the Format Tab. This tab is used to tweak the layout dimensions for your selected label format. LibreOffice left justifies the text near the left edge of the label with a minimal indent. In my case, I had problems with the left margin and the loss of print data near the left margin due to my printer’s non-printable area on the page. I also wanted a small indent before printing the label text at the left edge of the label.

The rational behind my changes. The 0.19” left margin has two problems related to my printer and/or printer driver, and how I want the labels text justified. My printer has a 0.25” left margin area that is not printable, so part of the text will be lost if the labels are printed with the default left margin (0.19”). In fact, using Linux Mint and LibreOffice 4.2, I could not print the labels. I would press the print button and the print job failed without an error message. I then realized that the no-print area on the page and theprinter driver might be causing the problem.

Hence, my change to a 0.4” left margin (an increase of 0.21”), 0.3” might also work. I want the 0.21” margin increase to also apply to the labels in the 2nd and 3rd columns. So, there is no change to the Horizontal Pitch. But, since I increased the left margin, I need to reduce the width of the label by the same amount (-0.21”) to keep the text on the physical label. See Figure 19 and Figure 20.

The following table summarizes my somewhat trial-and-error modifications of the label settings. The “Save” button will be important if you do not want to repeat these steps too may time while trying to remember your previous changes.

Parameter Avery 5260 Default My Modification Remarks

Horizontal Pitch 2.75”

Vertical Pitch 1.00”

Width 2.63” 2.42” Decrease by 0.21”

Height 1.00”

Left Margin 0.19” 0.40” Increase by 0.21”

Top Margin 0.50 May need to tweak if the vertical spacings is off. Consider +/- 0.01 increments.

Columns 3

Rows 10

Page Width 8.50”

Page Height 11.00

SuiteCRM_AddressLabels_Tutorial_09.odt Page 23 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 24: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

These are the default Avery 5260 layout dimensions.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 24 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 19: LibreOffice, Base – Label Wizard – Default Label Layout Dimensions

Page 25: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

And these are my modified dimensions. Note that I saved the modification in a file j_5260 Address. If I need to tweak the labels again, I can use this filename to get the modified layout back without having to remember all of the changes I might have tried.

Use the “Save” button to save you format changes for future use. Change the name (“Type”) so that you do not overwrite the Avery default. I add a “j_” prefix to the name so that all of my customizations are in the same general location when selecting a label format on the “Labels” tab.

Modified Avery template.

You might experience a problem with the non-printable right margin area if you have long text information in you labels. I did not, so I did not address this potential issue. You might have to reduce the label width more to meet this requirement.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 25 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 20: LibreOffice, Base – Label Wizard – Modified Layout Dimensions & New Save Name

Page 26: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The final tab is the Options Tab. You want to keep the “Synchronize contents” so that all of the labels on the sheet have the same data format.

You may need to change your printer setting using the Setup button. In my case, my printer default is set to duplex which is not practical for address labels. But, this change does not seem to be persistent when you get to the actual printing, and has to be reset again.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 26 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 21: LibreOffice, Base – Label Wizard – Options Tab – Synchronize and Printer

Page 27: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.5 LibreOffice, Writer – The Label Template

Now it is time to actually begin printing your labels.

Go back to the “Labels” tab.

Make sure that the label Brand and Type meet your requirements. The Type should be the new name that you may have created above. In my case j_5260 Address. If not, change the name to the modified file that you created. Otherwise, your custom dimension changes will not be applied.

Now it is the time to click the “New Document” button.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 27 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 22: LibreOffice, Base – Label Wizard – New Document

Page 28: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

If all the computer gods are happy, a LibreOffice Writer window opens with the label template.

The label template show the data fields wrapped to the next line if there is not space for all of the text on agiven line. The actual printed label with your actual data will not be wrapped.

You will now want to save this template.

You will be able to reuse the template again the next time you need to print mailing labels.

If you do not save the template, you will have to repeat all of the above steps to recreate the template.

You should still be in your working directory.

From the toolbar:

File > Save As > j_AddressLabels_01_Template.odt (use your filename convention)

SuiteCRM_AddressLabels_Tutorial_09.odt Page 28 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 23: LibreOffice, Writer – Label Template

Page 29: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.3.6 LibreOffice, Writer – Printing Labels

Now to print your labels.

File > Print

You will get a dialog box asking if you want to print a form letter. Click “Yes”.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 29 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 24: LibreOffice, Writer – Print Form Letter

Page 30: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The Mail Merge dialog box open: Select the “Printer” radio button and click “OK”.

The printer dialog box open, check your printer properties again. For some reason, the changes made to the printer properties during the label layout steps are not maintained when you get to this point in the process.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 30 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 25: LibreOffice, Writer, Mail Merge Print Dialog Box

Page 31: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Here are 2 screenshots of my labels: one is a partial screenshot showing just 5 rows and 2 columns of the label sheet, the 2nd is the complete sheet. Note, if you do not have address information in your SuiteCRMdatabase, you will still see the comma separator between the City and State printed on the label. This is caused by the blank address data field in my test data. I think these can be suppressed, but that will take some Google searching for how to handle blank data lines. I will have street address information in my actual data, so this is not critical for me.

Now it is trial and error time.

If your layout is not satisfactory, then you will need to go back to the LibreOffice Base file again and repeat the New Labels steps again. See Section 4.3.4, LibreOffice, Base/Writer – Label Template on page19. If you saved your changes to the Avery label file, then the next iteration should be simpler. Just remember to save the Avery label changes again, and the new Writer label template. You can overwrite the old label and template files to keep consistent files names.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 31 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 26: LibreOffice, Writer – Printed Label – partial 5 rows and 2 columns

Page 32: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The complete label sheet with 29 names (this is dummy test data, not real names)

SuiteCRM_AddressLabels_Tutorial_09.odt Page 32 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 27: LibreOffice, Writer – Printed Labels – All 29 contacts

Page 33: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.4 LibreOffice CleanupOnce you have finishing printing your labels, it is now time to cleanup the working files so that you will start with a fresh database the next time you want to print labels. If you do not erase the working files, thenext SuiteCRM csv export will add a suffix to your filename depending upon your operating system. Plus, the new data may not replace the old data in the other working files. A new filename will not be consistent with the existing label template and database registration synchronization.

At this time I have the following files in my working directory.

• j_AddressLabels_01.csv

• j_AddressLabels_01.ods

• j_AddressLabels_o1.odb

• j_AddressLabels_01_Template.odt (Do not erase this file)

Erase your working csv, ods, and odb files. (Your file name may be different)

Or, as I did, rename the files so that I could reuse again if needed in my testing, and break any link to the old data for the registration and synchronization.

Do not erase the template file (odt).

This completes the initial setup of the SuiteCRM and LibreOffice files and the printing of the 1st set of address labels.

Printing the labels the next time involves a subset of these steps.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 33 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 34: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.5 Subsequent Label PrintingMake sure that you have erased the csv, ods, and odb working files before beginning the subsequent workflow steps.

4.5.1 SuiteCRM Subsequent Workflow

Refer to section 4.2, Initial SuiteCRM Setup for more information and screenshots.

• Update the contact information in your SuiteCRM database.

• Rerun you label report, in my case j_AddressLabels_01

• Export the report information to a csv file, in my case j_AddressLabels_01.csv.

• Move the csv file to your working directory

4.5.2 LibreOffice Subsequent Label Printing

Refer to section 4.3, Initial LibreOffice Setup for more information and screenshots. The subsequent workflow is a subset of the initial setup workflow.

This workflow is dependent upon maintaining consistent files names and directories. The Write template (odt) is looking for the Base data (odb) from a registered database with a specific file name and location.

• LibreOffice Calculate, open the csv file that you exported from the SuiteCRM report.

• LibreOffice Calculate, save the working file as a ods file format.

• LibreOffice Base, open the Calculate ods file (see the initial setup section for screenshots)

• LibreOffice Base, save the working file as a odb file format

• LibreOffice Write, open the template file that you saved in your working directory, in my case j_AddressLabels_01_Template.odt. The template should link to your registered Base file when you print.

• LibreOffice Write, print your labels.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 34 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 35: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Here are a partial series of screenshots for the subsequent workflow:

I had renamed my working files from the setup steps in case I needed to reuse those files during my testing. Hence, the j_AddressLabels_01_old.ods file above.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 35 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 28: LibreOffice, Calculate, Saving the csv Import as ods

Page 36: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

SuiteCRM_AddressLabels_Tutorial_09.odt Page 36 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 29: LibreOffice, Base, Opening the Calculate ods Spreadsheet

Figure 30: LibreOffice, Base, Browse to Calculate ods File

Page 37: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

In this case, Base recognized the need to register the database and provided a dialog box.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 37 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 31: LibreOffice, Base, Save & Register the odb Database

Page 38: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

I had renamed my working files from the setup steps in case I needed to reuse those files during my testing. Hence, the j_AddressLabels_01_old.odb file above.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 38 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 32: LibreOffice, Base, Saving the Database as an odb File

Page 39: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

In Writer, open your existing template odt file (j_AddressLabels_01_Template.odt) and click “Yes” to update the links.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 39 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 33: LibreOffice, Writer, Opening the Label Template, Syncing to Registered Database

Page 40: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

File > Print

SuiteCRM_AddressLabels_Tutorial_09.odt Page 40 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 34: LibreOffice, Writer, Label Template Before Printing

Page 41: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Click “Yes” to print the form letter.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 41 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 35: LibreOffice, Writer, Print From Letter Dialog, Sync Label to Database

Page 42: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

Select the “Printer” radio button and click “OK”.

Check you printer properties again before printing.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 42 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 36: LibreOffice, Writer, Label Print Setup Window

Page 43: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

The new labels after changing the j_Xmas Yes/No for 1 contact in the SuiteCRM database and using the subsequent workflow process. Note the floating “,” from the missing address line information.

SuiteCRM_AddressLabels_Tutorial_09.odt Page 43 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Figure 37: LibreOffice, Writer, Subsequent Workflow, Updated Labels

Page 44: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

4.5.3 Working File Cleanup

Repeat the cleanup steps from section 4.4, LibreOffice Cleanup.

At this time I have the following files in my working directory.

• j_AddressLabels_01.csv

• j_AddressLabels_01.ods

• j_AddressLabels_o1.odb

• j_AddressLabels_01_Template.odt (Do not erase this file)

Erase your working csv, ods, and odb files. (Your file name may be different)

Or, rename the working files if you think you many need them again.

Again, do not erase the odt template file, in my case j_AddressLabels_01_Template.odt!!!

SuiteCRM_AddressLabels_Tutorial_09.odt Page 44 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser

Page 45: Table of Contents - SuiteCRM · 2018-01-19 · several manual steps in each phase. It uses SuiteCRM as the data source, and LibreOffice 5.1 for the other workflow steps. • SuiteCRM,

Address Labels: SuiteCRM & LibreOffice 5.1

5 SummaryThis document provides a workflow for creating mailing labels from a SuiteCRM database using LibreOffice.

• No, it is not a simple 1 or 2 click workflow

• Yes, it is a multi-step manual workflow

• Yes, it does print address labels

Happy Address Label Printing!

SuiteCRM_AddressLabels_Tutorial_09.odt Page 45 of 45Printed Dec 8, 2016 @ 10:06 PM JoeNewUser