Issue 109375 - Mail merge data preview fails on first "Next Record" field
Summary: Mail merge data preview fails on first "Next Record" field
Alias: None
Product: Writer
Classification: Application
Component: viewing (show other issues)
Version: OOo 3.2
Hardware: PC (x86_64) All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-02-17 16:29 UTC by devdol
Modified: 2014-03-24 18:48 UTC (History)
2 users (show)

See Also:
Latest Confirmation in: 4.1.0-beta
Developer Difficulty: ---

sample merge data (8.85 KB, application/octet-stream)
2010-02-17 16:52 UTC, devdol
no flags Details
sample merge layout (8.29 KB, application/octet-stream)
2010-02-17 16:53 UTC, devdol
no flags Details
Compilation of screenshots to point out the issue (53.59 KB, image/png)
2010-02-17 16:54 UTC, devdol
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description devdol 2010-02-17 16:29:17 UTC
0) Use Version 3.1 oder 3.2(RC5) on Linux or Windows, the results are the same.
   The screenshots were made on a German version, so I cannot provide 
   the exact EN UI terms, but will give a generic translation in brackets.

1) Create a new spreadsheet with data to be merged (2 columns, some records) 
   like that:
	Number	Numeral
	1	one
	2	two
	3	three
   (and so on). Save it as "merge-data.ods".

2) Create an empty writer document, save it as "merge-layout.odt";
   it should default to an "A4 portrait orientation" page layout.

3) Start "Extras"[Tools]/"Serienbrief-Assistent"[mail merge wizard]

4) Choose its first option (to use current document)

5) "proceed >"

6) Choose first document type "Brief"[letter]

7) "proceed >"

8) In the 3rd dialog, 
    press "1. Adressenliste auswaehlen..." [select address list]
   "Hinzufuegen..." [add...] and navigate to the spreadsheet 
    created above at step (1), 
    then deselect the second option field to add an address block.

9) "proceed >"

10) In the 4th dialog, deselect the first option to insert a salutation.

11) "proceed >" will take you to the 6th dialog

12) Choose "Dokument bearbeiten" [edit the document]

13) Press F4 to open "Datenquellen" [data sources]; "Sheet1" will be displayed

14) drag the two column heads ("Number" and "Numeral" in the sample attached) 
    into the empty document and write the word " is " between them

15) Make the paragraph centered, raise fontsize to 44, 
    define an extra 8 cm distance above the paragraph

16) Duplicate this single paragraph by copy and paste.

    - Now we have a layout like we'd like to print A5 handouts on A4 paper,
    labels or something else that needs more than one record per page. -

17) Return to the mail merge wizard, use its navigation buttons 
   at step "6. Dokument vorbereiten" [prepare document] 
   to browse through the records:  

   You will see same data in both paragraphs - that's correct so far.

Now lets demonstrate the bug:

18) Choose "Dokument bearbeiten" [edit the document] again.

19) Place the cursor at the ende of the FIRST paragraph
   (i.e. between the second field and the paragraph symbol)

20) Choose "Einfuegen[Insert]/Feldbefehl[command
field]/Andere...[Other...],Datenbank[database],Naechster Datensatz[next record]"
and press "Einfuegen" [Insert].
20a) Optionally: Press Ctrl+F9 to verify that a "Next record" field actually has
been inserted, and press Ctrl+F9 again.

21) Return to the wizard as in (17) and browse through the records:

You will notice that only the first paragraph's fields are updated with sample
data, while the second (more general: every field beneath the first "next
record" instruction ) paragraph's fields always remain empty. 
Furthermore, while browsing in our 2-records-on-a-page-example should display
only odd values on the first paragraph, every second preview isn't realistic, at
least if you will create your merge without an offset (but then the even values
on top of the pages were wrong).

If you finally generate your merge with step 7 of the wizard, the resulting
document will be correct, but the misleading browsing experience and incomplete
rendering of field preview unnecessarily devaluates a data preview.

Related issues I've found:
 26878 - mail merge: see values in current document (NEW)
 77724 - Create a mail merge toolbar (NEW)
 20057 - Q-PCD Improve usability of Mail Merge (CLOSED,FIXED)
Comment 1 devdol 2010-02-17 16:52:29 UTC
Created attachment 67881 [details]
sample merge data
Comment 2 devdol 2010-02-17 16:53:03 UTC
Created attachment 67882 [details]
sample merge layout
Comment 3 devdol 2010-02-17 16:54:41 UTC
Created attachment 67883 [details]
Compilation of screenshots to point out the issue
Comment 4 michael.ruess 2010-02-18 12:01:18 UTC
The "next record" field is only of value when you select more than one record in
the Database browser (F4) and merge it via the "merge field" button in the
database toolbar.
The "next record" is not for use with mail merge where only one record at a time
is processed.
Comment 5 michael.ruess 2010-02-18 12:09:28 UTC
Comment 6 devdol 2010-02-18 12:40:00 UTC
Thanks mru, this really is a interesting point ... especially when you consider
the fact, that it works - though not intended by the developers, as I now see -
when it comes to the actual merging process! 

Because of this AND because I got familiar with the "NEXT RECORD" functionality
from some other office suite ,-) AND considering the fact that I'm surely not
the only one moving to OOo with this background, I may modestly ask to change my
posting's state from DEFECT to FEATURE REQUEST.

Summarized in short: just make the preview show up what the real merge will do,
as this is the most inherent feature of a preview.

Comment 7 michael.ruess 2010-02-18 13:11:16 UTC
Reassigned to requirements.
Comment 8 Edwin Sharp 2014-03-24 18:48:26 UTC
Confirmed with
AOO410m14(Build:9760)  -  Rev. 1573062
2014-03-01_04:11:01 - Rev. 1573123