[reportlab-users] Tables with sub-totals

Mike Driscoll mike at pythonlibrary.org
Wed Oct 16 15:51:32 EDT 2013


On Wed, Oct 16, 2013 at 1:47 PM, Tim Roberts <timr at probo.com> wrote:

> Mike Driscoll wrote:

> >

> > I have a project where I'll receive an unknown amount of data that

> > needs to be put into a table. When the table reaches the end of the

> > page, it needs to add a sub-total as the last row before splitting.

> > This will happen on each subsequent page until we reach the last page

> > which should have the grand total of all previous pages. How does one

> > tell Reportlab to add a subtotal row before splitting?

> >

> > I know how to get a table to split, just not the sub-total part.

> >

> > I am considering calculating the number of rows that can fit on a page

> > and inserting the sub-total into the data list that I pass the Table

> > object, but I was hoping there was a better way.


> No, the Table object is a convenience. It's not a full-blown report

> writer.


> Fortunately, it's not that hard to track the "how much room left"

> computation yourself.


> --


Okay. I'll just do it another way then. Thanks!

Mike Driscoll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20131016/bc8af894/attachment.html>

More information about the reportlab-users mailing list