Why is "Keep together" not working on "Detail" for me in a report?

Warning: I’m not sure I’ve used all terms correctly here…

I have a report. It is supposed to create a document with repeated “Detail” blocks, one per reported record. Each detail block spreads across the width of the page.

If printed on A4… and I think you’ll see similar on other paper sizes… it prints 8 records AND A BIT on the first page. (Maybe and a bit on “Letter” size paper.)

I attach the database so you can see exactly what’s going on… if you are incredibly generous with your time! STOP PRESS: PS: I made some mistake in creating the “demo”. I don’t think you’ll find it usable. Sorry.

I cut the database down, to save you download time. I hope it runs okay for you.Please let me know if I cut too much? All you need to do is load it, go to “reports”, and run the report. You should get something like the attached demo output.

DemoOutput.odt (34.7 KB)

FDB042-BooksShrt.odb (26.4 KB)
(Apologies-Prior to 02 Dec 2022, 16:40, (London time), I had the WRONG FILE here. It may STILL not work! (See “stop press”), but at least now it is the right file!)

SPARE COPY-code128.ttf.pdf (7.7 KB)

STOP PRESS: PS: I made some mistake in creating the “demo”. I don’t think you’ll find it usable. Sorry.

I also include a bar code font used in the report, in case you need it to see the phenomenon, but I don’t think you do. If you do, strip the “.pdf” off of the name of the .ttf file. (I had to lie to the forum upload bot to sneak this past it.)

All this on a Windows 10 machine, LO (x64)

What I’ve tried… and don’t understand why it isn’t the answer…

While editing the report, I set the “Keep Together” property of the “Detail”… block?..to “true”.

I thought that would prevent any splitting of a record’s “band” across pages. But, whether that’s the correct way to describe what is happening or not, I get a tiny bit of what I’d call “the 9th record’s band” appearing at the bottom of the first page.

For those reading this later… don’t bother setting the Detail block’s “Force New Page” to anything other than “None”… that gives you one record’s band per page!

Yes! I think I can “fix” this with the nasty kludge of very very carefully tweaking how much space I set aside for the page’s footer… but I would hope there is a more robust, elegant solution to my want?

It’s a very old bug - inherited from OOo: Bug 45338
Workaround: Don’t put any content in section “Detail”. Create a group for the content. If there is a field like the primary key, let the primary key be the the field for the group. Group headers will keep together if you choose it - detail sections won’t do it.

Many thanks Robert… that sounds like what I need. I’ll give it a try, and get back to this thread with results when I can.