[reportlab-users] extra row in table

Justin Shepard jshepdev at gmail.com
Wed Jun 6 15:05:25 EDT 2012


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)

### extra row example
Row | Last Name | First Name | Blah
1 | Smith | Jack | gobble
2 | Carpenter | Jane | more blah
...
50 | Q | Bobby | etc
| | |
---- page split ---
Row | Last Name | First Name | Blah
51 | Someone | Elsey | gobble blah
| | |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20120606/8bc3992f/attachment.htm>


More information about the reportlab-users mailing list