[reportlab-users] Re: KeepTogether and splitting tables (John
Pywtorak)
Larry Bates
larry.bates at websafe.com
Fri Dec 23 12:25:09 EST 2005
----------------------------------------------------------------------
>Message: 1
>Date: Thu, 22 Dec 2005 11:27:46 -0600
>From: Larry Bates <larry.bates at websafe.com>
>Subject: [reportlab-users] KeepTogether and splitting tables
>To: reportlab-users at reportlab.com
>Message-ID: <43AAE212.3080905 at websafe.com>
>Content-Type: text/plain; charset=ISO-8859-1
>
>I have an application that has tables that look like the following:
>
> Table Heading
>
> Col1 Col2 Col3 Col4 Col5
>Row 1
>Row 2
>Row 3
>.
>.
>.
>Row n
>
> Table Footer
>
>Problem: How can I keep the table footer together with
>at least one (1) or the rows of the table on a page? I
>don't mind the table splitting across pages (I repeat the
>heading and column headings properly), I just don't
>want the footer to be on a page by itself. I wrapped
>the entire table/footer in a KeepTogther but that just
>moves the entire table to a new page which is not what
>I want.
>
>Thanks in advance for your assistance.
>
>Regards,
>Larry Bates
>
>
>
>
>------------------------------
>
>Message: 2
>Date: Thu, 22 Dec 2005 10:02:09 -0800
>From: John Pywtorak <jpywtora at calpoly.edu>
>Subject: Re: [reportlab-users] KeepTogether and splitting tables
>To: Support list for users of Reportlab software
> <reportlab-users at reportlab.com>
>Message-ID: <43AAEA21.4080302 at calpoly.edu>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>It would seem like you need to move the table footer out from the body
>and make it a page footer. Without having done this exactly I would
>think using the platypus onPage handlers would do the trick for creating
>your table footer. However, if you are drawing borders say and want
>your body table(s) to take up the entire page even if empty then I think
>you may need to look at subclassing the Flowable Table, or creating your
>own that can do that.
>
>Hope this helps.
>
>Larry Bates wrote:
>
>
>>I have an application that has tables that look like the following:
>>
>> Table Heading
>>
>> Col1 Col2 Col3 Col4 Col5
>>Row 1
>>Row 2
>>Row 3
>>.
>>.
>>.
>>Row n
>>
>> Table Footer
>>
>>Problem: How can I keep the table footer together with
>>at least one (1) or the rows of the table on a page? I
>>don't mind the table splitting across pages (I repeat the
>>heading and column headings properly), I just don't
>>want the footer to be on a page by itself. I wrapped
>>the entire table/footer in a KeepTogther but that just
>>moves the entire table to a new page which is not what
>>I want.
>>
>>Thanks in advance for your assistance.
>>
>>Regards,
>>Larry Bates
>>
>>
>>_______________________________________________
>>reportlab-users mailing list
>>reportlab-users at reportlab.com
>>http://two.pairlist.net/mailman/listinfo/reportlab-users
>>
>>
>
>
Nope that won't work. There could be several tables on a page that each
have
a footer. I could also have a table that spans a page and the footer
should
immediately follow it.
Basically what I want (and probably can't get) is something like:
KeepTogether(table( [(0, -2), (-1, -2)]), footer)
That would mean keep the footer and the last row of the table together.
-Larry Bates
More information about the reportlab-users
mailing list