Issue 124597 - MAILMERGE: Wrong record Number in Mailing
Summary: MAILMERGE: Wrong record Number in Mailing
Status: CLOSED DUPLICATE of issue 122243
Alias: None
Product: Writer
Classification: Application
Component: printing (show other issues)
Version: 4.0.1
Hardware: PC All
: P2 Normal with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-04 12:12 UTC by CdChar
Modified: 2017-05-20 10:12 UTC (History)
3 users (show)

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


Attachments
Contains 3 files mentionned in description (242.74 KB, application/x-zip-compressed)
2014-04-04 12:12 UTC, CdChar
no flags Details
Correct result, after applying filter, one odt file per document (9.35 KB, application/vnd.oasis.opendocument.text)
2014-04-07 08:21 UTC, CdChar
no flags Details
Wrong result one PDF file per document (21.04 KB, application/pdf)
2014-04-07 08:26 UTC, CdChar
no flags Details
Wrong result a single ODF file for all documents (8.94 KB, application/vnd.oasis.opendocument.text)
2014-04-07 08:31 UTC, CdChar
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description CdChar 2014-04-04 12:12:23 UTC
Created attachment 83083 [details]
Contains 3 files mentionned in description

Same as LibreOffice Bug: 
https://bugs.freedesktop.org/show_bug.cgi?id=76995

Problem description: 
I don't have an English version installed, so menus name could be not exactly the one expected

While printing type letters ( File --> print --> yes to question, "do you wish to print type letters"
I wish to print the record number in the data base

Steps to reproduce:
1. Create a Mailing document for a xls or ods file as data base
2. Insert in the document the record number as explained in:
https://help.libreoffice.org/Writer/Database
Insert --> Fields --> Other --> Database --> type = record number

3. Print a type letter
File --> Print --> yes to the question :"do you wish to print a type letter"


Current behavior:
1) If I create a unic file containing all documents, all the documents have the same number ( empty or a value)

2) If I create an ODT file for each document, each one has a correct number ( from 1 to the number of file in DB or result of filter on DB)

3) If I create an PDF file for each document, all the documents have the same number ( empty or a value)

4) If I do the same tests with mailing assistant(Tools --> Mailing assistant)
Even the ODT files for each document ( as in step 2) are wrong

Expected behavior:
Each document, using any print mode, has a record number in the data base or in the result of a filter in the data base.
I expect to print that one ( which is not a page number)

I have the same issue with LibreOffice Version: 4.1.5.3, 4.2.3.2 as well.
I have recently installed LibreOffice and last OpenOffice version. I was able to use this option since 2006, with a previous OOO version, I don't remember wich one, may be before it became Apache.
I use this option to print fiscal documents once a year.
              
I attach list_mvt.ods the database, on which a filter should be applied: 
Nom not empty 
and
Montant > 0

then "Lejeune" should have number 3 when printing

bulletin.odt is the document to print
change the database in order to link it to list_mvt.ods

etapes.odt contains step by step screen shots ( In French)
Comment 1 oooforum (fr) 2014-04-04 13:05:24 UTC
Duplicate of #i122243#
Comment 2 Edwin Sharp 2014-04-04 13:40:08 UTC
(In reply to oooforum from comment #1)
> Duplicate of #i122243#

IMHO related but not duplicate
Comment 3 Edwin Sharp 2014-04-04 13:57:02 UTC
1. File - Wizards - Address Data Source... - liste_mvt.ods is registered as data source
2. File - Open... - bulletin.odt
3. View - Data Sources
4. Standard Filter for Nom not null & Montant > 0
5. File - Print... - Yes
6. (Description case 1) Output=File - Save merged document - Save as single document - OK - Save

Resulting document has Numéro dans la base empty.

AOO410m15(Build:9761)  -  Rev. 1583666
2014-04-01 13:50 - Linux x86_64
Debian
Comment 4 Edwin Sharp 2014-04-04 14:13:48 UTC
Description case 2: Numéro dans la base: empty
File name has trailing zero, i.e. Dupont0.odt instead Dupont.odt
Comment 5 Edwin Sharp 2014-04-04 14:16:20 UTC
Description case 3: Numéro dans la base: empty
File name has trailing zero, i.e. Dupont0.pdf instead Dupont.pdf
Comment 6 Edwin Sharp 2014-04-04 14:22:18 UTC
Core of problem is indeed same as issue 122243
Sorry and thank you

*** This issue has been marked as a duplicate of issue 122243 ***
Comment 7 CdChar 2014-04-04 16:23:31 UTC
Thanks.
Just a comment more, for me the value is not empty but "1"
Comment 8 CdChar 2014-04-07 07:09:29 UTC
The last feature version, working correctly, I used, is the one of OOo 3.3.0
Comment 9 Edwin Sharp 2014-04-07 07:27:56 UTC
updating version according comment 8
Comment 10 Edwin Sharp 2014-04-07 07:30:41 UTC
3.3 worked... sorry for misunderstanding.
Comment 11 CdChar 2014-04-07 08:21:35 UTC
Created attachment 83112 [details]
Correct result, after applying filter, one odt file per document

1. File - Open... - bulletin.odt ( see previous attachement 83083)
2. File - Print... - Yes
3. View - Data Sources if not already done, attach liste_mvt.ods as data source
4. Standard Filter for Nom not null & Montant > 0

6. Output=File - Save merged document - Save as one ODF file per document - OK 

The result for the file containing, Name="lejeune"  , record number= 3
This result is correct
Comment 12 CdChar 2014-04-07 08:26:25 UTC
Created attachment 83113 [details]
Wrong result one PDF file per document

Wrong result, after applying filter, one PDF file per document

1. File - Open... - bulletin.odt ( see previous attachement 83083)
2. File - Print... - Yes
3. View - Data Sources if not already done, attach liste_mvt.ods as data source
4. Standard Filter for Nom not null & Montant > 0

5. Output=File - Save merged document - Save as one PDF file per document - OK 

The result for the file containing, Name="lejeune"  , record number= 1
This result is not correct
Comment 13 CdChar 2014-04-07 08:31:58 UTC
Created attachment 83114 [details]
Wrong result a single ODF file for all documents

wrong result, after applying filter, a single odt file as output

1. File - Open... - bulletin.odt ( see previous attachement 83083)
2. File - Print... - Yes
3. View - Data Sources if not already done, attach liste_mvt.ods as data source
4. Standard Filter for Nom not null & Montant > 0

5. Output=File - Save merged document - Save as one ODF file per document - OK 

The result for the file containing, Name="lejeune"  , record number= 1
This result is wrong
Comment 14 CdChar 2014-04-07 08:36:46 UTC
Note that the 3 previous tests can be done after applying filter
for Nom not null & Montant > 0

then selecting in the displayed lines after the filter applyed, only one line, the one with name = "Lejeune", according the option selected to create the resulting file, you will get number=3 ( correct) or "1" ( could be also empty)
Comment 15 CdChar 2014-04-07 10:11:04 UTC
May be "duplicate", but my tests and results according to the option choozen are slightly different