[reportlab-users] table header
William Dode
reportlab-users@reportlab.com
12 Oct 2002 12:42:41 +0200
Robin Becker <robin@reportlab.com> writes:
> In article <87r8ewgh02.fsf@flibuste.net>, William Dode <wilk-
> ml@flibuste.net> writes
> >Jerome Alet <alet@librelogiciel.com> writes:
> >
> >> On Sat, Oct 12, 2002 at 12:02:33AM +0200, William Dode wrote:
> >> >
> >> > The header of the table, with the name of the column, how can i repeat
> >> > it on each page if the table is going on somes pages ?
> >>
> >> IIRC just pass the repeatRows = n argument in the Table() call
> >
> >thanks, it resolv my first problem easily !
> >
> >any idea for the next one ? my question is maybe not very clear ?
> >
> >bye
> >
> Are you attempting to re-use the same table for different data? That
> won't work. If that's not the problem can you post a simplified example
> so we can see what the problem is?
no, i use different table for each break. and some tables go on somes
pages without break (repeatRows is great !, i did'nt find it on the
api-reference book ?).
my problem is to change the page header depends on the data of the page.
If i use onPage, when onPage occur i don't know wich data is on the
current page without gymnastic.
i build my story like that :
for row in recordset:
if breakrow:
close the table
story.append(table)
story.append(foot of the table)
if breakthepage:
story.append(break the page)
else:
table.append(row)
for the page header, i used onPage=myheader
but on myheader i don't know which row is curently print in the current
page...
shall i use a different pagetemplate for each break ? but i will need to
break the page each time...
thanks
--
William Dode - http://wikipython.tuxfamily.org