Bug 87048 - Mailmerge fail to print selected records
Summary: Mailmerge fail to print selected records
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 102930
  Show dependency treegraph
 
Reported: 2014-12-06 14:17 UTC by Teruel deCampo
Modified: 2016-10-03 09:50 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Teruel deCampo 2014-12-06 14:17:18 UTC
ref:
opensuse kde 13.2
libreoffice 4.3.3.2.-4.1

Problem: after I select a record and print, the printer windows does not come, there is no job in the cue, no error message. The same if I want to sent to a file, no file is written.

Description: I make a template with writer that is connected to a database written with base from LO, it has few fields many related to name, address etc.
When I click print on the template the the dialogue comes “Your document contains address database fields. Do you want to print a form letter?” and say no it prints the envelope with the data fields as text, if I say yes open the database then  I select the records and print, but nothing goes to the cue. If I select files, no file is produced. 

To be sure that I did not have any corrupted file I just did the following:

1. I created a new database / table
2. created a new template with the corresponding data fields
3. setup the printer
4. it printed OK
5. save it as a template
6. open try to print. No printing, the print window does not pop out.

So it seems after the save for some reason I lost the connection with the database although I can see the database after the "form letter" printing dialogue
Comment 1 Teruel deCampo 2014-12-06 19:56:17 UTC
It seems that the problem to print occurs after save as template. 
After a brand new documented using the data fields of an old created file, everything is OK. Then I save it as a template
Then I open the template, print, I select the records to print, the dialogue comes up, print but now the printing windows does not comes up. 
The file save is an ott file. Because these files are working in previous version of LO (I'll do more testing here) the problem may not occur during the save but the reading of the saved file.
Comment 2 Teruel deCampo 2014-12-07 13:48:15 UTC
I just made a new "template" this are the findings

1. the form letter with the data base fields works as expected.

2. I save as a template. A new ott file is made. 

3. I save as a document. It creates a new odt file.

4. I close and restart LO, I open the template (ott) everything looks OK the dialogue comes, I select the record, but it does not print

5. I close and restart LO, I open the odt file, everything looks OK the dialogue comes, I select the record, now the print window comes and it prints as it should.
Comment 3 Alex Thurgood 2015-01-03 17:40:44 UTC Comment hidden (no-value)
Comment 4 rnelibre 2015-03-15 18:03:25 UTC
This is still an issue in 4.4.
There are several reports of this happening in various versions, just to mention it.

If anybody is interested, a workaround that worked for me:
- in the document, before printing
- Select View / Data Sources (F4)
- Select all the rows (e.g. click in the top left of the data grid
- In the Data toolbar, click button "Data to Fields"
- then print, but select "No" in the "print a form letter" dialog
Comment 5 rnelibre 2015-03-15 18:07:04 UTC
(In reply to rnelibre from comment #4)
> This is still an issue in 4.4.
> There are several reports of this happening in various versions, just to
> mention it.
> 
> If anybody is interested, a workaround that worked for me:
> - in the document, before printing
> - Select View / Data Sources (F4)
> - Select all the rows (e.g. click in the top left of the data grid
> - In the Data toolbar, click button "Data to Fields"
> - then print, but select "No" in the "print a form letter" dialog

Bad news - the workaround worked only for small sample that would fit in the page.

Also - this is not only Linux problem. I am on Mac OS X.
Comment 6 David Cousens 2015-12-14 09:15:57 UTC
Linux Mint Rafeala 17.2 
LibreOffice 5.0.1.2
I am experiencing a similar problem. I have a list of names and addresses in a spreadsheet. I start the File_>New->Labels dialog. I setup the database to point to the spreadsheet and the table containing my data. I transfer the fields I want to use into the template in inscription using an Avery J8165 Label. The format matches the J8165 labels I am using. In the options tab I select Entire page and syncronize contents, then select New Document. In the new document which is created I add an image (logo) to the top of the first label select it and then syncronise labels. On a first attempt to print, either to file or a printer I did not get a file created or any print job created. As per comment below I selected View_>Datasources and checked that the selected spreadsheet and table were appearing as the data source. After selecting the top left cell and selecting all records and pressing the Data to Fields button, and then reprinting the file selecting No to the dialog about printing a form letter,  I managed to get a the first page printed out correctly but the 6 records on a second page did not print. I then repeated the above steps (View_>Datasources etc) and attempted to print to file using the Yes to the question about printing a form letter, selecting all records and print to file, entering a filename in the save dialog and saving. No file is produced. 

By going back to the View_>Datasources, selecting the remaining records and repeating the print procedure which had worked for the first page I also managed to print the remaining records.
This is definitely not working as per the documentation which is also fairly unclear on the differences between selecting Yes and No in the dialog which comes up re using Mail Merge to print a form letter. I fail to see why this dialog is even necessary as if one is printing Labels using the Label wizard it is pretty clear one does not want to print a form letter. I guess the mail merge procedure is being used to create the Labels from the Label template created.  This just cost me three hours in processing orders.
Comment 7 nking 2015-12-21 14:40:07 UTC
Same problem still exists on 5.0.4 on OSX 10.11.1

Mail merge with labels simply fails after the records to merge are selected.  No print dialogue, no error messages, nothing.
Comment 8 Timur 2016-01-06 19:49:00 UTC
Please update the title with specifics, if it's template or Linux/Mac or Itanium. 
I don't remember having problems like this in Windows.
Comment 9 nking 2016-01-07 01:27:57 UTC
I updated hardware to x86-64 since that's the only one I know of for sure.  I'm not sure how to select multiple OS's from the drop down list (OSX and Linux (mint and opensuse) so far).  I think the title is pretty accurate because it literally just "fails" when you try to print a mailmerge.  Nothing happens, no messages appear, nothing.
Comment 10 Timo Jyrinki 2016-02-01 09:11:30 UTC
I've received reports on this with LibreOffice 4.4 and 5 on both Linux Mint and Mac OS X (both LO versions), and can confirm myself on Ubuntu 14.04 LTS / LibreOffice 4.2.

Leaving the platform as "All" as there is no way to select multiple options like Linux + Mac OS X.
Comment 11 Timo Jyrinki 2016-02-01 09:16:51 UTC
Updating version, retested the problem to be there with 5.0.4~rc2 too on x86_64/Linux.
Comment 12 Jan-Marek Glogowski 2016-10-03 09:32:20 UTC
(In reply to Teruel deCampo from comment #0)
> libreoffice 4.3.3.2.-4.1
> 
> Problem: after I select a record and print, the printer windows does not
> come, there is no job in the cue, no error message. The same if I want to
> sent to a file, no file is written.
> 
> Description: I make a template with writer that is connected to a database
> written with base from LO, it has few fields many related to name, address
> etc.
> When I click print on the template the the dialogue comes “Your document
> contains address database fields. Do you want to print a form letter?” and
> say no it prints the envelope with the data fields as text, if I say yes
> open the database then  I select the records and print, but nothing goes to
> the cue. If I select files, no file is produced. 
> 
> To be sure that I did not have any corrupted file I just did the following:
> 
> 1. I created a new database / table
> 2. created a new template with the corresponding data fields
> 3. setup the printer
> 4. it printed OK
> 5. save it as a template
> 6. open try to print. No printing, the print window does not pop out.

This should be fixed in LibreOffice 5.2 by

commit 55654acd1d026491004528371995ce112b33721b
Author: Jan-Marek Glogowski <glogow@fbihome.de>
Date:   Wed Jan 27 13:04:04 2016 +0100

    MM: don't try to save the source MM document

LO MM just used to work with unmodified, "real" documents, but not templates. In case of a modified file, it even tried to save it, for whatever reason.

When LO opens a template (ott) it generates an (semi-)modified, "real" file (odt), but since it was never saved, I guess it can't be saved without a user supplying a file name, and therefore would never become unmodified.

Without an error from the dialog message, this is completely perplexing for a user, as nothing happens.

@Oliver probably you can fix the documentation. Ask me for additional input, if needed.

(In reply to David Cousens from comment #6)
> LibreOffice 5.0.1.2

> This is definitely not working as per the documentation which is also fairly
> unclear on the differences between selecting Yes and No in the dialog which
> comes up re using Mail Merge to print a form letter.

@Oliver: guess this needs some better documentation, also regarding the interaction with MM.

> I fail to see why this
> dialog is even necessary as if one is printing Labels using the Label wizard
> it is pretty clear one does not want to print a form letter.

The label wizard just creates the document. The document knows nothing about labels, but it contains "hidden" "next record" database fields and other fields a user inserted, which identifies it as a MM document. You can see them, if you select View -> Field names. As one can "generate" documents via View -> Datasources -> Data to Fields button, this dialog is necessary.

> I guess the
> mail merge procedure is being used to create the Labels from the Label
> template created.  This just cost me three hours in processing orders.

You guessed correctly that internally all document generation is done by the mail merge procedure.