https://bugs.documentfoundation.org/show_bug.cgi?id=154259
Bug ID: 154259 Summary: Mail merge omits entire line if all the fields on that line are empty in database Product: LibreOffice Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: UNCONFIRMED Severity: normal Priority: medium Component: Writer Assignee: libreoffice-bugs@lists.freedesktop.org Reporter: j...@kamens.us Created attachment 186058 --> https://bugs.documentfoundation.org/attachment.cgi?id=186058&action=edit files which demonstrate this bug Note: This is about LibreOffice Community 7.5.2.1 installed via the Ubuntu Lunar x86_64 repository. For some reason 7.5.2.1 isn't a choice in the Version drop-down. This issue may occur in earlier releases but this is the first release in which I've noticed it. Scenario: 1. Create a spreadsheet with three columns with the headers "First", "Last", and "Nick". 2. Put two rows below the header row. Put something in all three fields in one of the two rows, but leave the "Nick" column empty in the other. 3. Save the spreadsheet. 4. Create, register, and save a database connected to this spreadsheet. 5. In Writer, create a labels document with at least two labels on it, with a single label synchronized across the page. 6. In the first label, insert the following: First: <First field from database> Last: <Last field from database> Nick: <Nick field from database><Next record for database sheet> 7. Synchronize that label across the page 8. Print, i.e., do a mail merge, to a file. 9. Open the file and observe that for the row in the spreadsheet where "Nick" is blank, rather than that label saying "Nick:" with nothing after that, that line has been completely removed from the label! Why this matters and is incorrect behavior: If I'm formatting badge inserts and I've carefully designed the layout, then I want that layout to be consistent across all of the badges I print. If there's a field that is expected to be blank, then I want that line to still be in the output, blank, so that everything after that on the insert is lined up the same as everybody else's badges; I don't want it to all move up a row. The only workaround I've been able to find for this issue is to add another column to the spreadsheet called "b", put a pipe character in that column in every row, insert that field into my badge inserts, and make the field white so it's invisible when the inserts are printed. This is gross and shouldn't be necessary. I'm attaching a zip containing files constructed as above which demonstrate this issue. You'll have to register the database before you can reproduce the issue on your end, or you can just build the scenario yourself as described above; it is 100% reproducible, at least for me. -- You are receiving this mail because: You are the assignee for the bug.