**JUNK** [reportlab-users] (no subject)
Robin Becker
robin at reportlab.com
Thu Jul 7 13:52:35 EDT 2005
Michael Trisko wrote:
> Hi, we're producing documents with Reportlab and I've run into a situation I'm not sure how to handle. One of the documents we are producing contains a table that can be one to many pages, some of the columns in the table contain numeric values, and we would like to include page subtotals of those values in the last row of the table on each page. Since it's possible that the cells can wrap, it seems difficult to predict which rows will be on which page, and therefore it seems difficult to calculate the subtotals.
>
>
>
> Can anyone tell me how we can accomplish this with Reportlab? Unless I missed something, there was nothing in the User Guide or demos that covered this.
>
>
>
> Thanks,
>
> Michael Trisko
>
> Textura LLC
..... well apart from subclassing Table I guess you might be able to get away
with a PTOContainer:
'''PTOContainer(contentList,trailerList,headerList)
A container for flowables decorated with trailer & header lists.
If the split operation would be called then the trailer and header
lists are injected before and after the split. This allows specialist
"please turn over" and "continued from previous" like behaviours.'''
The contentList would contain a single Table initially. When split it would need
to communicate with the trailerList objects somehow.
The Table instance has to be able to do the sumSofar. How to do that is a
problem since there seems to be no difference in the onSplit call.
--
Robin Becker
More information about the reportlab-users
mailing list