[reportlab-users] Extra row at end of table and page breaks [Repost]

Justin Shepard jshepdev at gmail.com
Thu Jul 5 13:51:49 EDT 2012


I posted this question before but never received any suggestions.

I'm building a table by using a list to store the data, and a table style.
I also have splitByRow enabled and repeatRows set to 1 (to handle headers).
The problem is that there is an extra row added at the end of each page and
at the end of the table. I have a row counter on the left of the page and
these blank rows are never numbered. Where are they coming from and how can
I get rid of them?

### code
data = list()
ts = [('FONTNAME', (0,0), (-1,-1), 'Courier'),
('FONTSIZE', (0,0), (-1,-1), 6),
('ROWBACKGROUNDS',(0,0),(-1,-1),[colors.white,colors.lightgrey]),
('LINEABOVE', (0,0), (-1,0), .5, colors.darkgray),
('ALIGN',(0,0),(-1,0),'CENTER')
]

table = Table(data, [.25*inch, 1*inch, 1*inch, .25*inch, .5*inch, 1*inch,
1*inch, 2.75*inch], .1*inch, style=ts, splitByRow=1, repeatRows=1)

Attached is a screen shot of the row numbers (you can see the grey row that
has been added at the end of my table, this also happens when it flows over
to a new page). I've tried setting the backgrounds to ignore the last line,
but ReportLab isn't considering that to be a line so that doesn't work...
it's more like a footer that I can't figure out how to control. Maybe it's
coming from the flowable, rather than the TABLE, but I don't know what
exactly is controlling it.

Thanks,
Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120705/656925ad/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rowNumbers.PNG
Type: image/png
Size: 614 bytes
Desc: not available
Url : <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120705/656925ad/attachment.png>


More information about the reportlab-users mailing list