[reportlab-users] Table and Paragraph
Aitzol Naberan Burgaņa
reportlab-users@reportlab.com
Thu, 15 Jul 2004 11:48:33 +0200
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi all,<br>
I'm new using reportlab and I have some troubles with tables. <br>
I want insert a pargraph into a table cell
(data.append([Paragraph(text,style),Paragraph(text1,style)]), two
colums one row table, I think)<br>
But when I try to build my pdf file I get this error:<br>
<br>
Traceback (most recent call last):<br>
File "taula.py", line 111, in ?<br>
go()<br>
File "taula.py", line 107, in go<br>
doc.build(getFlowables())<br>
File "/usr/lib/python2.3/reportlab/platypus/doctemplate.py", line
579, in build<br>
self.handle_flowable(flowables)<br>
File "/usr/lib/python2.3/reportlab/platypus/doctemplate.py", line
496, in handle_flowable<br>
if self.frame.add(f, self.canv, trySplit=self.allowSplitting):<br>
File "/usr/lib/python2.3/reportlab/platypus/frames.py", line 111, in
_add<br>
w, h = flowable.wrap(self._aW, h)<br>
File "/usr/lib/python2.3/reportlab/platypus/tables.py", line 451, in
wrap<br>
self._calc()<br>
File "/usr/lib/python2.3/reportlab/platypus/tables.py", line 325, in
_calc<br>
self._calc_height()<br>
File "/usr/lib/python2.3/reportlab/platypus/tables.py", line 296, in
_calc_height<br>
raise ValueError, "Flowable %s in cell(%d,%d) can't have auto width
in\n%s" % (v[0].identity(30),i,j,self.identity(30))<br>
ValueError: Flowable <Paragraph at 1079373196>Isabel I.aren
(1558-163) eta J in cell(0,1) can't have auto width in<br>
<Table at 1079373164 27 rows x 2 cols> with cell(0,0) containing<br>
'<Paragraph at 1079373196>Isabel I.aren (1558-163) eta J'<br>
<br>
It seems something with the Paragraph width, but I don't know what. I
search the usermanual and reference guide for something to set the
paragraph width, but I don't see nothing.<br>
<br>
Any hint with this????<br>
<br>
</tt>
<div class="moz-signature">-- <br>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>firma</title>
<span style="font-family: courier new,courier,monospace;">Aitzol
Naberan Burgaña<br>
CodeSyntax<br>
<a href="mailto:anaberan@codesyntax.com">anaberan@codesyntax.com</a><br>
<a href="http://www.codesyntax.com">www.codesyntax.com</a><br>
</span>Tel: 943 82 17 80<br>
</div>
</body>
</html>