[reportlab-users] Report lab tables
Johan Paul Glutting
reportlab-users@reportlab.com
Mon, 04 Oct 2004 08:48:28 +0200
To respond to my own email, it works like this:
def tbl():
t = Table(
(('test','test2','test3'),
(1,2,3),
(72,36,36),
(24,16,16)
) )
return t
... you need to move that extra parenthesis to the end of the function.
what you seem to by trying to produce here is a 3x4 grid. The location
of the parenthesis converted that to a 3x2 grid with two tuples passed
in at the end ...
Cheers,
JP
En/na Johan Paul Glutting ha escrit:
> There is a typo here (not sure if it got in while you were passing it
> to email). There is an extra close-parenthesis after (1,2,3)
>
> The data that goes into a table must be a a sequence of sequences -
> the outer sequence is usually a list, but I don't know if that is
> absolutely mandatory (I have not gotten all the way through your
> example yet). I do know that you can have a list as the inner sequence
> (I convert them to lists frequently so that I can manipulate the
> results as text - insert thousands commas, convert nulls to "--", etc.)
>
> More later ...
>
> JP
>
>