[reportlab-users] Is there a way to prevent table split between particular rows?

Robin Becker robin at reportlab.com
Wed Feb 24 05:20:33 EST 2016


Hi Lele & Axel,

.........
>> What do you think?
>
> This sounds like a good idea.
> I create a table where two rows are grouped together.
> (First row describes start condition, second row end condition.)
> They alternate background color (2 rows white, 2 rows gray)
> Sometimes the table is split inside a pair of rows which looks unprofessional:-)
>
> In my case it would be
>   ('KEEPTOGETHER', (0, 1), (2, 3), ...)
.......


I just don't like the KEEPTOGETHER tag since that is already used elsewhere in 
Paragraph styles and is in fact not totally binding. I think we should use 
'NOSPLIT' and it seems we already did! I had completely forgotten about this 
command.


Can you try adding

('NOSPLIT', (0, 2), (-1, 3))

or

('NOSPLIT', (0, 1), (2, 3))

to see if this actually works for you?
-- 
Robin Becker


More information about the reportlab-users mailing list