[reportlab-users] Table example

Juan Efren Castillo juanefren at gmail.com
Thu Jan 7 22:26:18 EST 2010


I am trying to draw a simple table.
According to docs, this will make a table

data= [['00', '01', '02', '03', '04'],
['10', '11', '12', '13', '14'],
['20', '21', '22', '23', '24'],
['30', '31', '32', '33', '34']]
t=Table(data)
t.setStyle(TableStyle([('BACKGROUND',(1,1),(-2,-2),colors.green),
('TEXTCOLOR',(0,0),(1,-1),colors.red)]))

How ever I am not sure how to insert it to my canvas, looking into the
source I found draw and drawOn methods, how ever when I try them I get this
error:

"Table instance has no attribute '_colpositions'"

How should I place my table?
Thanks.


--
Juan Efrén Castillo Encinas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20100107/dc2535a0/attachment.htm>


More information about the reportlab-users mailing list