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

David Fraser reportlab-users@reportlab.com
Thu, 16 Oct 2003 16:12:31 +0200


Marc Stober wrote:

>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
>  
>
Hi Marc

Thanks, this is interesting

Any hints or code on how the FancyTable layout algorithm works? Is it 
that you can use a simple algorithm because you know how you want it 
laid out, or does it have more advanced layout algorithms built in?

Thanks
David