[reportlab-users] Sample code for repeating table headers/footers?

Paul Barrass paul.barrass at safeonlinebilling.com
Sun Feb 22 09:04:54 EST 2009


Adrian Klaver wrote:

> On Saturday 21 February 2009 9:44:18 am Dinu Gherman wrote:

>

>> Hi,

>>

>> I cannot find any sample code for repeating header/footer rows

>> in tables?

> For a header row, straight from the User Guide. Repeats the first row passed to

> the Table(), in this case the data in dList.

> tbl = Table(dList,style=TBL_STYLE,colWidths=COL_WIDTHS,repeatRows=1)

>

> I have yet to find a footer equivalent for a table

As far as I'm aware, there is no per-page Table footer - however you
should be able to adjust the workaround I posted for long table
performance a while back (
http://two.pairlist.net/pipermail/reportlab-users/2008-October/007594.html
) to provide a footer as well as a header - though I've never checked to
see if this actually works. There would be no need to split the data
into multiple Tables unless you needed the performance boost, and that
should remove some of the constraints.

That suggestion is really an evil gratuitous hack, and you'd probably be
a lot better off altering Table to repeat footer rows, but that would
probably involve a lot of work updating the styling etc.

Paul Barrass.


More information about the reportlab-users mailing list