Created attachment 119919 [details] Database with 5 records When you print from a database having odd number of records and that you have 2 records on one sheet the last record is not printed. So if you have 5 record numbered from 1 - 5 only 1 - 4 (2 sheets) are printed and record 5 is rejected. Behaviour: Printing to an document is only printing fully filled sheets. Sheet 3 containing record 5 is not printed. Expected behaviour: Printing all sheets leaving the last sheets with only one record. How to verify bug: 1. Create a spreadsheet with headers called number and text. 2. Create 5 records numbered from 1 - 5 and some text 3. Save spreadsheet as test.ods 4. Register spreadsheet as a database test. 5. Create a new document using New/Labels and Options with 'Synchronize contents' marked 6. Use Brand: Avery A4 | Type: C2351 Avery A5 Greeting Card. 7. Insert from database field 'Text' 8. Using CTRL+F2 (More Fields) to insert 'Next record' after 'Text' 9. Press F4 to generate mail merging and chose the 5 record. 10. Save to a file and check that only the consecutive records 1 - 4 is to be found in the record. Attached test data in a database
Added regression as it has worked previously.
Reproduced. Clarification for step 8: tab Database - first insert Mail merge fields - (your db), Sheet1, Text. Then Next record - Sheet1. Win 7 Pro 64-bit, Version: 5.0.2.2 (x64) Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe Locale: fi-FI (fi_FI)
Still present in Version: 5.0.4.1 Build ID: 2def61bcbb29a7a8611b833682fe1291910b11ad Locale: en-US (en_US.UTF-8)
Bug still present in Version: 5.1.0.0.beta2 Build ID: 53054959a12edc6510f51b94ddc9b73d27aedaf6 Threads 2; Ver: 4.2; Render: default; Locale: en-US (en_US.UTF-8)
Migrating Whiteboard tags to Keywords: (bibisectRequest) [NinjaEdit]
> 4. Register spreadsheet as a database test. How do I do this step? When I go to tools -> base -> databases it doesn't list any ods files, only odf database. If someone explains this I'll bibisect the bug.
(In reply to Joel Madero from comment #6) > > 4. Register spreadsheet as a database test. > > How do I do this step? When I go to tools -> base -> databases it doesn't > list any ods files, only odf database. If someone explains this I'll > bibisect the bug. Yep step 4 is a bit hazy. You have to go all the way to: New database (wizard) - Connect to an existing db - Spreadsheet. Then just browse for your .ods and finish. It will be ok. Note my comment 2 for clarity in step 8.
(In reply to Beluga from comment #2) > Reproduced. > > Clarification for step 8: tab Database - first insert Mail merge fields - > (your db), Sheet1, Text. Then Next record - Sheet1. > This is still really confusing for me. a) "tab Database" - where? On the label dialog? b) Most confusing part "Then Next record - Sheet1" - I don't see anything about Next record on the dialog... Sorry for being a PITA but I can't bibisect if I can't follow the instructions :-/
When you press CTRL+F2 being in Writer you have a different tabs. Go to database tab and then insert field "Next record"
What version of LibreOffice worked as expected? 4.4? Before that? If you tell me I can tell you the package to download (it's several gigs) to try to bibisect it. Thanks for the offer.
It worked in 4.4. How to bibisect 4.4 - 5.1?
https://wiki.documentfoundation.org/QA/Bibisect/Linux#Versions You'll want to download the 45max package probably. If you can't follow the instructions on that page just let me know and I'll try to walk you through it. You can email my privately.
Maybe it would help, if he attached screenshots of the Step 8 process.
Bug still present in Version: 5.1.0.2 Build ID: ecd3574d51754b043f865cf5bafee286d24db7cc CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; Locale: en-US (en_US.UTF-8)
Bug still present in Version: 5.0.5.1 Build ID: 7609023f63524a6c8326f6c82e7e23f55a5b7bb5 Locale: en-US (en_US.UTF-8)
Bug still present in Version: 5.1.1.1 Build ID: c43cb650e9c145b181321ea547d38296db70f36e CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; Locale: en-US (en_US.UTF-8)
(In reply to p_kongstad from comment #16) > Bug still present in Version: 5.1.1.1 > Build ID: c43cb650e9c145b181321ea547d38296db70f36e > CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; > Locale: en-US (en_US.UTF-8) Any chance for a screenshots of step 8?
Created attachment 122627 [details] Step 8 with screen shot Added screen shot of step 8.
Bug still present Version: 5.1.2.1 Build ID: 2603b69c5ec5981bb5f053f8ebfd1f3de00a4c29 CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; Locale: en-US (en_US.UTF-8)
https://cgit.freedesktop.org/libreoffice/core/commit/?id=bdb0c4e128ffb7b0d30fd90153762802de514cda
Bug still present in Version: 5.1.2.2 Build ID: d3bf12ecb743fc0d20e0be0c58ca359301eb705f CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; Locale: en-US (en_US.UTF-8)
TESTING with LO 5.2.0.0.alpha1+ OS Version: Mac OS X 10.10.5 Build: 2016-05-11_01:01:27 (In reply to p_kongstad from comment #0) > How to verify bug: > > 1. Create a spreadsheet with headers called number and text. > 2. Create 5 records numbered from 1 - 5 and some text (using attachment 119919 [details]) > 3. Save spreadsheet as test.ods > 4. Register spreadsheet as a database test. So, shove the spreadsheet into a database file ('testbase.odb'). > 5. Create a new document using New/Labels and Options with 'Synchronize > contents' marked > 6. Use Brand: Avery A4 | Type: C2351 Avery A5 Greeting Card. > 7. Insert from database field 'Text' > 8. Using CTRL+F2 (More Fields) to insert 'Next record' after 'Text' Testing on OSX, so I'm using: Insert -> Field -> More Fields (In reply to p_kongstad from comment #9) > When you press CTRL+F2 being in Writer you have a different tabs. > > Go to database tab and then insert field "Next record" Note: The dialog will not close, but you will see additional field-colored space appear after the <Text> in the document. > 9. Press F4 to generate mail merging and chose the 5 record. Tools -> MM Wizard -> Next -> Next -> Next -> Finish > 10. Save to a file (Save Merged Documents) -> Save as single large doc -> click (Save Documents) > and check that only the consecutive records 1 - 4 is to > be found in the record. I only found three (one, three, four). They were arranged with [one three] on the first page, and then [four] on the 2nd page. I'll attach the output as a PDF. I can't precisely reproduce the stated behavior, but I definitely did not get the expected output from the mail merge. So (roughly speaking) there's still a bug here.
Bug is still present in Version: 5.1.3.2 Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; Locale: en-US (en_US.UTF-8)
Bug still present in Version: 5.1.4.1 Build ID: a4d48e4ff0e9f93e78b6356ca7b0b6303e360356 CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; Locale: en-US (en_US.UTF-8)
Bug has been resolved in version Version: 5.2.0.1 Build ID: fcbcb4963bda8633ba72bd2108ca1e802aad557d CPU Threads: 2; OS Version: Linux 4.4; UI Render: default; Locale: en-US (en_US.UTF-8) Will this fix be introduced to version 5.1.x?
Closing and adding backport request.
Jan-Marek Glogowski committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9dbaf6b3b6112d9e16fd64ab0ed5dff6e513e5f8 tdf#95292 MM: add unit test It will be available in 5.3.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.