[reportlab-users] wrap text inside table cells

Nathalie Mansouri reportlab-users@reportlab.com
Tue, 25 Feb 2003 14:31:46 +0100


Hi,
When I create a table with text that includes the <br> tags, it just 
ignore them and adds everyhting into one line.
Here is part of the code I use:

if item['Techniques']:

    for one in item['Techniques']:

        Techniques += one +" <BR>"

Techniques = Techniques[:-4]

if item['Hours']:

    for hr in item['Hours']:

        Hours += str(hr) +" <BR>"

            TotalHours += hr

Hours = Hours[:-4]

        if item['charges']:

            for charge in item['charges']:

                charges += str(charge)+" <BR>"

charges = charges[:-4]

list = [item['Date'], Paragraph(Techniques, NStyle), Paragraph(Hours, NStyle), Paragraph(charges, NStyle)]

T.append(tuple(list))

t = Table(T, colWidths, splitByRow=1, repeatRows = 1)

self.Elements.append(t)


Any tips or solutions?

Cheers,
Nathalie