[reportlab-users] Table inside Table; is not able to split
Robin Becker
robin at reportlab.com
Wed Jan 16 10:22:29 EST 2008
Harald Armin Massa wrote:
> Hello, my code is roughly:
>
> result=[["123423","Superdruper","flutsch"],
> ["1219","nasele","fummer"],
> ["9128","hupsi","bioung"],
> [.... many more rows]
> ]
>
> sdata=[]
> for row in result:
> sdrow=[]
> for col in row:
> sdrow.append(gboxpdf.Paragraph(gboxpdf.pdfencode(col),gboxpdf.stylesheet["Frage"]))
> sdata.append(sdrow)
>
> hl=gboxpdf.Paragraph(gboxpdf.pdfencode(self.titel),gboxpdf.stylesheet["Heading3"])
>
> if len(sdata) > 0:
> subtbl=Table(sdata,style=gboxpdf.TSTYLEXDATA)
> else:
> subtbl=Paragraph(" - keine - ",gboxpdf.stylesheet["Normal"])
>
> Table(data=[[hl,'',''],[subtbl,'','']])
>
>
> Everything works fine, as long as the number of rows within result is
> small enough so that the entire "subtbl" fits on one page.
>
> As soon as subtbl is larger than one page, PDF creation fails with
> "cell to large".
>
> content of a cell is a table, table bigger then one page: no
> rendering. Any idea how i could fix it (besides splitting result every
> 10 results)
>
> Best wishes,
>
> Harald
>
>
At present we don't split cells. So if the contents of the inner table gets too
large then we fail.
--
Robin Becker
More information about the reportlab-users
mailing list