Issue 123454 - Mail merge prints duplicate records if datasource is a .csv file
Summary: Mail merge prints duplicate records if datasource is a .csv file
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: printing (show other issues)
Version: 4.0.0
Hardware: PC All
: P3 Major with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: regression
: 121666 (view as issue list)
Depends on:
Blocks:
 
Reported: 2013-10-09 21:47 UTC by tim
Modified: 2015-10-25 07:14 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0
Developer Difficulty: ---


Attachments
list and merge letter (510.56 KB, application/download)
2013-10-09 21:47 UTC, tim
no flags Details
PDF reult of merge print (935.35 KB, application/pdf)
2013-10-15 16:41 UTC, tim
no flags Details
OO PDF tools can't merge (at least not more than one record) (238.69 KB, application/pdf)
2013-10-16 14:45 UTC, tim
no flags Details
Screen capture sequence, source and resulting files (562.04 KB, application/zip)
2014-02-27 15:39 UTC, tim
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tim 2013-10-09 21:47:27 UTC
Created attachment 81738 [details]
list and merge letter

Every time I merge-print all the records in this document--even after editing the number of records in the database (which is just a csv file), I get 30 duplicates starting after the 40th record. i.e. printing a one-page letter results in page 1-40 being the first 40 records and then pages 41-70 being record 11 through 40 again, and then the document completes the rest of the database.

I don't quite recall when, but I think this is NOT the first instance of this repeating performance.
Comment 1 Edwin Sharp 2013-10-11 11:54:45 UTC
1) Tools - Mail Merge Wizard...
2.1) Use the current document - Next
2.2) Letter - Next
2.3.1) Current address list: list-Cassed
2.3.2) This document shall contain an address block - checked
2.3.3) Match Fields... -> can not select fields, shows: Status"Salutation""FirstName""MiddleName""LastName"...

AOO401m5(Build:9714)  -  Rev. 1523756
2013-09-16 20:50:21 (Mo, 16 Sep 2013)
Win 7
Comment 2 tim 2013-10-11 14:06:43 UTC
Edwin:

I'm not sure what you are asking, but my version is:
AOO400m3(Build:9702)  -  Rev. 1503704
2013-07-16 14:54:56 (Di, 16 Jul 2013)

I did not have the address block checked, as I was having nothing but trouble controlling it and found it much, much easier to manually insert fields.

However, when I go through your steps I have no problem selecting whatever fields I want in the match fields area and see zero problems.
Comment 3 Edwin Sharp 2013-10-14 19:58:54 UTC
Sorry for late response, had some internet problems :(
My mistake for not using tab as separator when importing csv, sorry.

Can not detect duplicates using

AOO401m5(Build:9714)  -  Rev. 1524958
2013-09-20 11:54 - Linux x86_64
Debian
Comment 4 Edwin Sharp 2013-10-15 04:59:00 UTC
Can not detect duplicates using

AOO410m1(Build:9750)  -  Rev. 1525015
Rev.1525015
Win 7
Comment 5 tim 2013-10-15 16:40:14 UTC
I upgraded OpenOffice to 
AOO401m5(Build:9714)  -  Rev. 1524958
2013-09-20 11:40:29 (Fr, 20 Sep 2013)
and I still have the problem.

My .csv file has 122 records (header line plus 122 records for 123 lines). Print to PDF and get 152 pages, so 30 dupes. Same thing when I merged to a new file, got 152 pages (although the page numbers at the bottom of the screen in the .odt doc are even weirder "Page 1/303" it says).

Nanos shows up on page 11 and then again on 41 (pages 11-40 are repeated twice in the resulting merge, as I said).
Comment 6 tim 2013-10-15 16:41:59 UTC
Created attachment 81765 [details]
PDF reult of merge print

This was the resulting of printing the merge to a PDF. Shows repeated pages 11-40.
Comment 7 Edwin Sharp 2013-10-15 16:45:13 UTC
Maybe Win XP specific bug...
Will try to check on XP later this week.
Comment 8 Edwin Sharp 2013-10-16 08:13:30 UTC
Thank you for the PDF.
I see it wasn't produced by OpenOffice but Acrobat Distiller?
Comment 9 tim 2013-10-16 14:45:15 UTC
Created attachment 81772 [details]
OO PDF tools can't merge (at least not more than one record)

How the PDF was made is irrelevant, since the same thing happens when I ask OO to save the merge as a file. In addition, I don't think you can merge-print using the OO PDF creation tool. I end up with one page, showing the original document (oddly with one field code and the rest the merge result of a single record).
Comment 10 Edwin Sharp 2013-10-18 07:58:08 UTC
On Win XP:
In step 3 of mail merge wizard "Insert address block":
Select Address List... - Add... - select file list-Cassed.csv - Open - OK button is disabled???

Rev. 1523756
Win XP Home Edition SP2
Fujitsu Siemens Amilo A1650G
Comment 11 tim 2014-02-27 00:15:23 UTC
This bug still exists for me and is still driving me crazy! Just merge-printed mailing labels (to a new OO Writer file), and starting with label 40, we have a repeat of 30 addresses.
Comment 12 Edwin Sharp 2014-02-27 09:26:50 UTC
No duplicate records
Rev 1569541 Win XP

Please give an exact step by step description of what you do.
Comment 13 tim 2014-02-27 15:39:17 UTC
Created attachment 82735 [details]
Screen capture sequence, source and resulting files

I'm thrilled to say I have found a pattern of when this does and does not happen!

When I go to print the merge and the records show up on the screen for selection, if I just let is show me the first 40 records, it produces the dupes after those first 40 records; If I browse to the end record, it produces the right count.
Comment 14 Edwin Sharp 2014-02-28 08:45:46 UTC
Thank you Tim!
Confirmed (already with attachment 81738 [details], after registering data source)
AOO410m14(Build:9760)  -  Rev. 1572807
Rev.1572807
Win 7
Comment 15 Edwin Sharp 2014-02-28 09:20:07 UTC
No duplicates with OpenOffice.org 2.4.3
Comment 16 Edwin Sharp 2014-02-28 09:41:28 UTC
What I did to reproduce bug:
1) File - Wizards - Address Data Source...
2) Please select the type of your external address book: Other external data source - Next
3) Settings
4) Database type Text - Next
5) Path to the text files = path to list-Cassed.csv from attachment 81738 [details] - Test Connection - OK - Next
6) Specify the type of files you want to access 'Comma separated value' files (*.csv) - Row Format - Field separator {Tab} - Finish - Next
7) Location C:\OO\Data\list-Cassed.odb - Address book name list-Cassed - Finish
8) File - Open... country club letter Budgeting Marketing Style 2013-Oct_R2.odt from attachment 81738 [details] - Open
9) File - Print... - Yes
10) Output File - OK
11) File name: bug 123454 - Save
12) File - Open... bug 123454.odt - Open
13) Edit - Find & Replace... - Search for Nanos - Find All
-> Observe occurrences in page 21 and 81
Comment 17 Edwin Sharp 2014-03-31 11:55:07 UTC
*** Issue 121666 has been marked as a duplicate of this issue. ***
Comment 18 David Surgi 2014-06-16 19:31:08 UTC
This issue has cause me headaches for a while now.  the issue only seems show itself with CSV files.  If I connect to a  MYSQL database it does merge correctly so the issues seems to be with the way it imports CSV files.  I have not tested it on other file types.

The issue shows itself on both print to printer or print to file.
Comment 19 mroe 2014-08-18 05:56:41 UTC
I can confirm the problem for Linux too.
Comment 20 hanya 2015-10-25 07:14:48 UTC
I could reproduce the problem by the procedure in Comment 16. 
When I push "Refresh" button on the top, the correct number of records are shown 
and output result was correct.
The embedded data source browser loads wrong number of records.
But I could not obeserve the same result in the Data Source view in the 
Writer frame shown through View - Data Sources.