[reportlab-users] RE: Table Height
Henning von Bargen
Fri, 28 Nov 2003 13:24:40 +0100
It is not clear what you want to achieve:
Do you mean you want to repeat the footer on each page
of the table or do you want to see the footer only on the last page?
As you probably know, repeating the header on each page
is no problem, just use the repeatRows argument in the Table =
If the footer should print only on the last page, there's no problem.
If you really want the footer on every page of the table, it becomes
I think you would have to subclass the Table class
and implement the footer row yourself.
Basically this means changing the _splitRows function.
Look for the block following if repeatRows: ,
you would have to do something similar for the footer, I once =
something like this for a test.
BTW what information would you print in the footer?
Something like a running total? This could be tricky perhaps.
What you are trying right now is dividing the long table into many =
is that correct? I guess that's why you are trying to determine the =
It seems the wrong direction for me, because it contradicts the ideas =
If you're splitting the table into many small ones just for performance
you should also try my LongTable class (I can send it to you if you =
It works the same as Table, but performs much better for long tables.
Another option you can think about is to put the header and footer =
into your page templates.
> -----Urspr=FCngliche Nachricht-----
> Von: email@example.com
> Gesendet am: Freitag, 28. November 2003 09:06
> An: firstname.lastname@example.org
> Betreff: reportlab-users digest, Vol 1 #496 - 2 msgs
> Send reportlab-users mailing list submissions to
> To subscribe or unsubscribe via the World Wide Web, visit
> or, via email, send a message with subject or body 'help' to
> From: "Mau" <email@example.com>
> To: <firstname.lastname@example.org>
> Date: Tue, 25 Nov 2003 18:03:03 +0100
> Subject: [reportlab-users] Table height
> Reply-To: email@example.com
> Im making an application, where I print into a pdf a data array. =
> get each row of the array and place it in each row of a table. I fix =
> columns width of the table. I dont fix the rows height of the table, =
> when I fill in the data, there are some rows higher than others (that =
> what i want).
> Now, in my pdf i have 3 frames, a header frame, a data frame and =
> footer frame. The table goes inside the data frame. I tried to split =
> data of the array in several pages by calculating the number of lines =
> could place in the data frame and getting the same number of rows =
> the table, but as the table has some rows higher than others (a row =
> the array can take 3 rows from the table) i cant relay on my previous =
> I was thinking of calculating the table's height or each table's =
> height , and then split it depending on the data frame's height , but =
> dont seem to be able to find the way, if there is one.
> so, can someone help me with this? is there away to calculate a =
> height or a table's row height? Am I going in the bad direction? =
> I try other methods?
> well, any help is welcome.