Created attachment 87398 [details] Mailmerge with hidden sections I created the attached mailmerge document with some sections. Each section should show one record. At the end, empty sections should be hidden. Attached you also find the data source document to create your own test. I tried to hide the section by using the section condition field. I made several tests by using other conditions, but it doesn't work fine. I think that the condition does not recongize, that the record changes. Here some example for possible conditions: ![MAV] [MAV] == [Org-Nr.] and many more. I also tried to use the Master/Slave link, as it is used by labels. Using labels, you will have the same problem, becaus all labels will be printed and not be hidden. It would be nice to fix the error code, because our customer needs a quick solution. Regards Georg
Created attachment 87399 [details] Datasource for Mailmerge
Regarding the mailmerge labels: If you create some labels and if you place a logo on each label, all labels will be printed also if there is no data from the database on it. So the condition doesn't work here as well. To the conditions I used: [MAV] == [Org-Nr.] In some forums I found this recomendition, to compare two different fields that never would contain the same data. At the end of the records, the next, empty record, should be deliver empty (NULL) fields. So only in this case the condition becomes true. In all other cases the condition becomes false. ![MAV] Here I tried to check if data existis (true) or not (false)
Not a major bug - lowering to: Normal: Can prevent high quality/professional work Medium: Default seems appropriate For reference please see: https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link: https://wiki.documentfoundation.org/QA/BugTriage There are also other ways to get involved including with marketing, UX, documentation, and of course developing - http://www.libreoffice.org/get-help/mailing-lists/. Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4851cde7b98226b0f82ae2b191c290173e9b06c6 fdo#70346 MM: add mail merge data to condition dict The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Judging from comment 4 this is fixed, but I don't know how to verify as the original instructions do not have clear steps. What fields to assign to which stuff when creating the data source? I see the conditions can be created in Select address list - Filter, but what should I input and what should I be seeing as an expected result?
To clarify the steps: 1. Open odt 2. Goto Format -> Sections 2.1 Fix hide conditions in the sections to be !MAV 3. Run MM with attached datasource The Datasource has 5 entries, the document has 7 sections / lines. The resulting document should just show 5 lines - the other two lines should be hidden. Previously LO was just able to check fields used in the document, but not other fields in the DB. The patch adds values from unused columns to the evaluation dictionary, so these can be used in the condition evaluation.
Created attachment 109463 [details] PDF printed using 4.4.0.0 alpha2 from Nov 12 Showing seven empty rows per page. Is this incorrect? Win 7 64-bit Version: 4.4.0.0.alpha2+ Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827 TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Created attachment 109467 [details] Original document with fixed hide conditional sections
Created attachment 109468 [details] Correct / expected result
Well, I don't get that result. Maybe I'm not grokking the procedure, but the attachment serves as verification, so let's close this as fixed. Thanks for the patch.
Hi I reproduce on Windows 7/64 & Version: 4.4.2.1 Build ID: 93fc8832889bf050a10ec6d0171dae213adc9b55 Locale: fr_FR I do not agree with comment 6 > Previously LO was just able to check fields used in the document, but not > other fields in the DB. This *worked* in previous versions and it was possible to test database fields for at least OOo3.2. From the comments, it seems that the correction was never verified. So I reopen and set REGRESSION. I do not know from which version the bug was introduced. To facilitate testing, I attach a test document using the bibliography installed by default. The document contains three sections. Conditions hide: [Bibliography.biblio.Custom1]!="Deutsch" [Bibliography.biblio.Custom1]!= "English" [Bibliography.biblio.Custom1]!= "Français" Steps to Reproduce / 1. Open the attached document 2. View> Datasources (F4) 3. Select Bibliography> Tables> biblio 4. Use the vertical scroll bar to display the column "Custom1" 5. Click the header to select a record. 6. Click "Data to Fields" in the Datasource toolbar Expected result: depending on the content of the "Column1" only the corresponding section should appear. Actual result: All sections are displayed More information: hide a section depending on the value of a variable still works, but may be this bug is related to Bug 55814 ? Regards Pierre-Yves
Created attachment 114170 [details] Test document using bibliography
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=adb98d94ca1059b56d6b6726ca9aea96ecae8a96 tdf#70346 MM: don't restore section visibility It will be available in 4.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Hmm - ok I didn't realize this formating for conditions, so my patch is actually not needed and just a little bit of convenience for a user. I just fixed the introduced regression.
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "libreoffice-4-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea1caeed5cc70f41957d56af0ccb4bfdbd01cb87&h=libreoffice-4-4 tdf#70346 MM: don't restore section visibility It will be available in 4.4.3. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to pierre-yves samyn from comment #11) [...] > Expected result: depending on the content of the "Column1" only the > corresponding section should appear. > Actual result: All sections are displayed With the last commits it works now as expected. Tested with LibreOffice 4.4.3.0.0+ and master built at home under Ubuntu 14.10 x86-64. Closing as RESOLVED-FIXED. Thank you very much Jan-Marek. Best regards. JBF