AW: AW: AW: [reportlab-users] setting Style for a Sum in a Table

reportlab-users@reportlab.com reportlab-users@reportlab.com
Fri, 18 Oct 2002 15:23:25 +0200


....may be a good thing for the FAQ

regards

jo

-----Ursprüngliche Nachricht-----
Von: reportlab-users-admin@reportlab.com
[mailto:reportlab-users-admin@reportlab.com]Im Auftrag von Robin Becker
Gesendet: Freitag, 18. Oktober 2002 15:09
An: reportlab-users@reportlab.com
Betreff: Re: AW: AW: [reportlab-users] setting Style for a Sum in a
Table


In article <FDEJJKLBELAKNCMDIADEEEOHCCAA.Jo-Bader@gmx.de>, Jo-
Bader@gmx.de writes
>
>
>its seams to work when setting to the amount of rows -1 .
>but i am not sure
>
># setting Style of the last row in a splitted table on the latest page
>self.tStyle.add('BACKGROUND', (0 ,nDataRows-1), ( -1, nDataRows-1),
>colors.darkgray)
>
># setting Style of the last row in a splitted table on each page
>self.tStyle.add('BACKGROUND', (0 ,         -1), ( -1,          -1),
>colors.darkgray)
>
>
>
>regards
>
>Jo
......yes that works because nDataRows-1 is a positive number so we only
set for the exact row. The -1 form is a relative last and when we copy
the styles during a split we're not being clever enough to distinguish
between what people mean ie repeat the style on every partial table so
if your 80 line table is split into

        0-19, 20-39, 40-59, 60-79

then I think the -1, style is being applied on rows 19, 39, 59 and 79
and probably we could be clever and split the styles better.
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users@reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users