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

Eric Hochmeister erichochmeister at gmail.com
Wed May 4 18:16:44 EDT 2005


Hi all,

I figured out how to pin a flowable to the bottom of a page thanks to
Robin's help (Thanks Robin!).  What I am trying to attempt next is to
have a table expand to fill the page but leave enough room for the
Summary flowable beneath it.

ie. pinning a flowable to the bottom of a page, fills the unused area
with nothing and draws the paragraph at the bottom.  What I would like
to do now is, have a table and if a particular SummaryFlowable
follows, it gets the size of the Summary Flowable, and expands itself
by inserting empty rows (which are empty, or maybe a row containing
spacers) so that the table expands to the Summary Flowable (which may
contain totals, etc.)

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...

Any recommendations on how to achieve the result I'm looking for?

Thanks,

Eric


More information about the reportlab-users mailing list