[reportlab-users] How to get table to expand to next flowable on page.

Robin Becker robin at reportlab.com
Wed May 4 19:23:09 EDT 2005


Eric Hochmeister wrote:
> Hi all,
.....
> 
> My first thought was to somehow get the next flowable in the wrap
> method for a Table.  And in there check to see what the next flowable
> was and if it was a Summary Flowable, ask it for it's wrap method  (to
> get it's size) and then figure out how much space is available which
> the table needs to fill and add empty rows to handle this.  But I
> could not figure out how to get a handle on the next flowable.  Is
> this possible?
> 
> Another idea was modifying the handle_flowable method in a subclass of
> BaseDocTemplate which would somehow account for this instance.... I'm
> not sure...
....
you won't get access to the next flowbale from inside a flowable.
You must either mess with the frame or create a flowable that contains your flowables.
That is the preferred route as it localizes the changes. Logically you need a table
and a summary flowable. If you know the width you can work out how to expand the
whole table + Summary so the summary ends up at the bottom of a frame. There will be
some special cases.
-- 
Robin Becker


More information about the reportlab-users mailing list