[reportlab-users] Force table not to split

Bill Freeman bfreeman at appropriatesolutions.com
Wed Aug 20 09:24:47 EDT 2008


Gert Burger wrote:

> Hi

>

> I am creating reports which contain many small tables, each fit the

> width of the page and are about 1/4 of its length. Each table only

> contains 2 rows of which the first is the header.

>

> By default it seems to split between rows, which is exactly not what I

> require. I would rather have it move the whole table to the next page.

> The documentation(userguide.pdf Chapter 7 Introduction) mentions a

> canSplit attribute but nothing more about it.

>

> How would one force reportlab not to split tables?

>

One possibility is to calculate the height of the table, and, if you
don't have that much space left
in the frame, force the next frame. (If there is an easier way, this is
still what's going on under
the hood, I'll bet.)

Bill




More information about the reportlab-users mailing list