Apache OpenOffice (AOO) Bugzilla – Issue 122887
Mail merge does not correctly omit Section formatted with Omit condition
Last modified: 2017-05-20 10:11:48 UTC
Created attachment 81196 [details] This is my test merge document Merging with address, to omit lines of address which are blank have used Section and Omit condition of form Address2 EQ "" etc. This worked in OO 3 but I have been unable to get it to work in OO 4.0.0 Created simple test case to show problem. Database is created from Calc sheet column headers Stat, Address1, Address2, Address3, Town, etc. I use Stat to select records to merge, # indicates include in merge. Viz: Stat Address1 Address2 Address3 Town Postcode # 10 Downing Street London Toytown XX66 6XX
(In reply to cabrat from comment #0) > This worked in OO 3 which version?
Worked in all OO 3 most recently used in 3.4.1
Regression from 3.4.1 according to user
Please specify steps to reproduce.
As far as I can tell this occurs with any merge and database with blank fields in the table and a merge doc in which the blank field is referenced in a section with an omit condition of the form Address2 EQ "" or Address2 == "" I attached my test merge doc and pasted my test table. When I merge with this or any of my merge documents where the omit condition worked with OO 3.4.1 I get a blank line in the resultant merged document. System is AMD FX6200 based Win7 64 bit fully updated. Any other details or examples you want please ask.
Created attachment 81209 [details] Test document The document is bound to the Bibliography database. It has a section that is hidden with condition: Address EQ "" To test that this works: - F4 / View - Data Sources - Select the table on the left: Bibliography - Tables - biblio - select the first record where Address == "" - select the toolbar item "Data to fields" to apply the document content with the current record Result: the section is hidden - modify the selected record, type some text inside the Address field - select the record again and press "Data to fields" Result: the section is now visible A) Test Mail Merge from print form letter: - try to print the document - the application will ask you if you want to print a form letter. Click "Yes" - in the "Mail Merge" dialog, select Output: File, Save merged document: Save as individual document, check "Generate file name", Field: Identifier, choose a Path Result: all merged document display the section, despite that Address <> "" B) Test Mail Merge from Tools - Mail Merge Wizard... - step 1: check "Use the current document" - step 2: check "Letter" - step 8: check "Save merged document and "Save as individual document". Press "Save Document" Result: the section is displayed only when Address <> "", in all other cases the section is hidden and there is no empty paragraph. ------- Conclusion: I can reproduce the bug with (A) but not with (B)
@cabrat: which merge method are you using? A) Mail Merge from print form letter B) Mail Merge from Tools - Mail Merge Wizard...
Using Tools Mail Merge Wizard, however have now tried merge from Print form letter and get same problem both ways. Previous Mail Merge problems have behaved differently on different systems possibly affected by speed. My present system is quite powerful 6 core processor and system on an SSD and data on an HDD. Also note, when I upgraded to OO 4.0 I had to re-register some databases and reconnect some merge documents.
Have tried test document attachment 81209 [details] and some of my other merge docs all of which worked fine on 3.4.1 - varied results. Using attachment 81209 [details] and Tools Mail Merge first record exhibits the problem subsequent records are correct. Using attachment 81209 [details] and print form letter all records include the section which should be omitted. With my own merge letter using attachment 81209 [details] first letter includes the blank lines subsequently blank lines correctly omitted. With a labels merge the blank lines were included on the first 14 labels i.e. first page of the merge and subsequently OK.
Sorry comment should read: Have tried test document attachment 81209 [details] and some of my other merge docs all of which worked fine on 3.4.1 - varied results. Using attachment 81209 [details] and Tools Mail Merge first record exhibits the problem subsequent records are correct. Using attachment 81209 [details] and print form letter all records include the section which should be omitted. With my own merge letter using Tools Mail Merge first letter includes the blank lines subsequently blank lines correctly omitted. With a labels merge the blank lines were included on the first 14 labels i.e. first page of the merge and subsequently OK.
Sorry, I am not sure about the current status of this issue as too much different scenarios are mentioned. Is keyword 'needmoreinfo' still valid? If not, please remove it. Are the needed information provided already? Has the defect been reproduced _as reported_ by a second person? If yes, please change status to 'CONFIRMED' Thanks in advance.
I was not able to reproduce the defect on my Windows 7 in AOO 4.0.0 as described by cabrat. All sections in the given sample are visible as Address2=="Whitehall" and Address3="London". Thus Address2 does not correspond to the given data values. @cabrat: Do I miss anything here? I also was not able to reproduce the defect on my Windows 7 in AOO 4.0.0 as described by Ariel in comment 6 @Ariel: I exactly tried the steps you have been provided, but all documents correct show resp. hide the section.
It appears that this bug does not behave identically on different systems since Ariel Constenla-Haile and I are not getting identical results from our two test cases. Also there is some inconsistency just on my own system, it seems only to affect the first letter in a merge and the first page when merging to labels. Earlier bug 121143 in mail merge test results were not identical on different systems so this can happen.
Status of this issue is still unclear. Was somebody able to reproduce the described defect in AOO 4.0.1?
Issue status still unclear to me --> adding keyword 'needmoreinfo'.
I tried Sample document <<2013-07-30 22:40 CEST, Ariel Constenla-Haile >> with "AOO 4.0.1 Release – German UI / German locale [AOO401m5(Build:9714) - Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions (a) Original Sample, Menu 'File -> Print -> Form Letter" Result: Section hidden in all print pages because column in biblio is empty (b) Sample with modified omit condition 'Identifier EQ "BOE00"', what should hide section only for Identifier BOE00 Menu 'File -> Print -> Form Letter -> to FreePDF' Result: Section hidden correctly only for that one Identifier (c) Sample with modified omit condition 'Identifier EQ "BOE00"', what should hide section only for Identifier BOE00 menu 'Tools -> Meil Merge Wizard Result: did not work, details see below. Results (c) The form letter test worked immediately without any problems. The Mail Merge Wizard test showed some problems what still need some research until I will have understood all details. (c1) There was some strange ambiguity concerning biblio database, probably caused by the lots of configuration changes I do for my tests (c2) I re-added the biblio database from user profile as address list, tested with <f4> and icon "data to fields", worked fine, so that I started the MMW test. (c3) MMW Test: In step 6 I stepped through the 32 documents, and as expected for "BOE00" section was hidden I continued and printed the result (to FreePDF) Result: Not hidden for "BOE00" (d) Did some further research. Strange result (c3) was caused by Identifier fields of invalid Database from ambiguity research under (c). After I had deleted these fields and only Identifier of the correct biblio database are in Letter document everything works fine. So currently I can not reproduce the problem from original report, but will do some research concerning address list definition differences between form letter and MMW. I will not test with reporter's sample because database is missing. @cabrat: Can you please contribute a complete test kit? I would prefer a solution with biblio database. @Ariel Constenla-Haile: Any idea how we can find out why we got opposite results with your test kit?
Comment on attachment 81196 [details] This is my test merge document Obsoleted sample document because it is useless without database. @reporter: Please contribute a complete test kit or a document using biblio database
I cannot now reproduce this fault consistently, sometimes it works properly sometimes sections are not omitted despite being blank, this with same databases and merge documents. Sorry.
Irreproducible per comment 18