Re: Is there a way to prevent table split between particular rows?

"Axel P. Kielhorn" <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
> Am 20.02.2016 um 00:19 schrieb Lele Gaifax <[email protected]>:
> 
> Robin Becker <[email protected]> writes:
> 
>> The docs need to be extended mea cupla :(
> 
> Don't worry, I know what it means to keep that in sync!
> 
>> The rowSplitRange is intended to prevent splitting near the top of the
>> table or to near to the end. There is only one allowed range = lo,hi
>> and splitting is only allowed if the lo<=splitpoint <=hi. I suppose
>> this could be extended to a more general list of allowed split ranges,
>> but that's not available right now.
>> 
>> If that's required I would have to do some extra thinking.
> 
> Well, the project I'm developing is not that important: should the customer
> raise her eyebrows, I will try to rearrange the printout using multiple
> tables, one for each group, wrapping each table within a KeepTogether element.
> 
> Anyway, for my need, it would maybe be more natural to express the constraint
> within the TableStyle, something like
> 
>  ...
>  ('KEEPTOGETHER', (0, 2), (-1, 3)),
>  ...
> 
> to mean that preferably a split should not happen between row 2 and 3. That
> could cover even the split-by-column case.
> 
> 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), ...)

Geetings
Axel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.