Bug 124550 - In Writer, when a mail merge document has different header/footer on a first page, final merged document has page headers messed up
Summary: In Writer, when a mail merge document has different header/footer on a first ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: x86 (IA32) macOS (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Mail-Merge
  Show dependency treegraph
 
Reported: 2019-04-04 16:06 UTC by Emil Prpic
Modified: 2019-08-21 10:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
example data source (37.69 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-19 07:41 UTC, Emil Prpic
Details
example template document (235.00 KB, application/vnd.oasis.opendocument.text)
2019-08-19 07:42 UTC, Emil Prpic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Prpic 2019-04-04 16:06:26 UTC
Description:
Mailmerge data is stored in a ODS, ODS is registered as a data source, and then displayed within Writer using View | Data Sources. Mail Merge toolbar is shown using View | Toolbars | Mail merge.
Mail merge document is formed, with different page style for the first page. The first page has a bitmap image as a part of page header, other pages don't.
After defining mail merge fields within mail merge document, clicking on "Save merged documents" (on the MM toolbar), and then choosing "save as one large document" renders a document that doesn't replicate the first page style in proper places. Clicking on "Edit individual documents" opens up a document that has correct first page styles for all mailmerge instances but the first one. The first instance (for the first data row from ODS) uses first page style for all pages...
I used this same workflow 6 months ago and it worked OK then, I think, but I can't remember which version did I use then.

Steps to Reproduce:
1. create a mail merge document in writer, having a different first page style (i.e. different first page header)
2. save merged documents as one big document - no first page style is replicated
3. edit individual documents - first page style is replicated in all instances but the first one.

Actual Results:
Merged documents with first page headers messed up in one way or the other

Expected Results:
Merged documents with proper first page styles


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Workaround - use "Edit individual documents", in the dataset repeat the first data row twice, and in final document delete the first instance manually.

Version: 6.1.5.2
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 8; OS: Mac OS X 10.13.6; UI render: default; 
Locale: hr-HR (en_HR.UTF-8); Calc: group threaded
Comment 1 Alex Thurgood 2019-04-09 06:53:40 UTC
@Emil : does this only occur when a spreadsheet is used as the merge datasource, or does it also occur with other datasources ?

I seem to recall that some of this problem has already been reported as linked to the first record in the datasource when that source is a spreadsheet.
Comment 2 Emil Prpic 2019-04-09 07:16:13 UTC
I don't have any other data sources to try. Can you send me some other type of data source to test with?
Comment 3 QA Administrators 2019-05-08 21:49:35 UTC Comment hidden (no-value, obsolete)
Comment 4 Emil Prpic 2019-05-09 20:57:48 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2019-08-17 13:50:54 UTC
Please attach example documents (including data source) so we do not have to create anything from scratch.
Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 6 Emil Prpic 2019-08-19 07:41:19 UTC
Created attachment 153494 [details]
example data source
Comment 7 Emil Prpic 2019-08-19 07:42:29 UTC
Created attachment 153495 [details]
example template document
Comment 8 Buovjaga 2019-08-19 10:30:59 UTC
(In reply to Emil Prpic from comment #0)
> Steps to Reproduce:
> 1. create a mail merge document in writer, having a different first page
> style (i.e. different first page header)
> 2. save merged documents as one big document - no first page style is
> replicated
> 3. edit individual documents - first page style is replicated in all
> instances but the first one.

Ok, so the documents are 6 pages long.

My results are:
Big document has image in header only for the first page of every 6-page series.
Individual documents have image in header only for the first page.

So it seems I am not seeing your problem.

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 3e64065612acec2eb29aa21e2b515953422256d7
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-08-15_22:57:26
Locale: fi-FI (fi_FI); UI-Language: en-US
Calc: threaded
Comment 9 Emil Prpic 2019-08-19 16:07:10 UTC
Where do I find version 6.4? 

Mine is: 
Version: 6.1.6.3
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 8; OS: Mac OS X 10.13.6; UI render: default; 
Locale: hr-HR (en_HR.UTF-8); Calc: group threaded

and it says that it's up to date.

Maybe you didn't notice, I use LibreOffice on Mac OS X...
Comment 10 Buovjaga 2019-08-19 16:15:36 UTC
(In reply to Emil Prpic from comment #9)
> Where do I find version 6.4? 

Version 6.4 is not yet released. You can try 6.3.0: https://www.libreoffice.org/download/download/
Comment 11 Emil Prpic 2019-08-21 10:43:18 UTC
I confirm that the bug is not repeatable in version 6.3.0.4
Comment 12 Buovjaga 2019-08-21 10:52:42 UTC
Great, let's close