[reportlab-users] Need help with a table problem: style setting on very last line of a table split over pages
andy at reportlab.com
Tue Jan 14 17:49:15 EST 2014
On 14 January 2014 22:40, Boar Gules <reportlab at boargules.com> wrote:
> In any case, I can't imagine I'm the only person who has ever wanted to do
Maybe, but I think you are the first one to point it out to us!
> So, what is the proper way to apply a different style only to the very last
> logical line of a table, even if it is split over multiple pages and so has
> more than one physical last line?
Is it not possible to just leave off the last row, then generate a
separate one-row table with the right style you need, with no space
I don't actually believe there is a clean way to do it IN ONE TABLE.
The table styling language was thought up before we ran into 'how to
split them over tables'. It's a tricky one as we make a single
forward pass, printing what we can on the current page and chopping
off the remains into a new table which we put back on the stack. I
guess one would need additional style options to indicate whether
every table style command with a negative coordinate should be
calculated "from the last row on the last page" or "from the last row
on this page"
In general, it's often a good idea to split up what looks like a big
complex table into smaller "table-lets" with no space between. It
makes the styling much simpler to code and follow. This is
particularly true of banded reports with groups and subgroups.
Hope this helps,
More information about the reportlab-users