Subject: [reportlab-users] Re: Problem with row&column spanning c ode not calculating table h

Marc Stober reportlab-users@reportlab.com
Thu, 16 Oct 2003 08:56:31 -0400


Hi David and all --

We have gotten around Andy's guideline to specify table widths in advance by
wrapping the Table in our own flowable class (we call it FancyTable). The
FancyTable accumulates the data and styles for the rows, then when it needs
to be drawn (on the wrap event) it creates a regular table.

It might be even simpler if the regular Table class constructor didn't
require all the data up front, so we could do something like:

t = Table()
for row in data:
	t.addRow(row)
t.colWidths = myFunction(t.data)

Sometimes I wonder if tables would be better approached as two separate
objects, one for tables of figures, and the other for use as a layout grid
(this applies to HTML even more than ReportLab).

Hope this helps,
Marc

--
Marc Stober
mstober@dalbar.com