[reportlab-users] modifying table header on subsequent pages

Robin Becker robin at reportlab.com
Thu Mar 24 06:22:02 EDT 2011


On 23/03/2011 19:04, Jon.Reinsch wrote:

> I have tables that can go on for several pages. The first row is a header -

> "Socioeconomic Resources", for example. I can use repeatrows to have the header

> appear at the top of each page when the table splits. That's great, but I'd

> really like it to become "Socioeconomic Resources (continued)" on pages after

> the first. Is there a simple way to do this?

......
A special kind of Flowable could perhaps change its output depending on how many
times it has been drawn


eg

class MyHeader(Flowable):
def __init__(self,para0,para1):
self.x = 0
self.content=(para0,para1)

def wrap(self,aW,aH):
return self.content[self.x].wrap(aW,aH)
def draw(self):
self.content[self.x].draw()
self.x = 1

Not sure if this actually will work, but it might.
--
Robin Becker


More information about the reportlab-users mailing list