[reportlab-users] last page in report

John Pywtorak jpywtora at calpoly.edu
Fri Sep 2 17:54:20 EDT 2005


Nicholas Wieland wrote:
> Probably it's quite simple, but actually I can't figure out how to solve the problem.
> I have to display something on the header of my last page, but I'm not able to find how to do it in my BaseDocTemplate subclass beforePage method, because the page number is variable.
> I know that that particular page and only that page will have a particular pageTemplate and probably I can use this information, but I don't know how.
>  
> Suggestions ?
>  
> TIA,
>   ngw 
> 

While I am no expert on this I think you would need to look into
doc.multibuild, or the multibuild method of BaseDocTemplate.  So the
first pass through you figure out how many pages you have and put the
same header on each page.  Then on the second pass when you hit the last
 page you change that header.

Keep in mind performance goes way down.  I have been successfully using
this for page n of n so far after a gracious user on this list pointed
it out.  Should be in the list archive.  Hope this helps.

Johnny P
-- 
Windows
Start Here
Frustrating Hanging Crashing
Blue Screen of Death
Reboot



More information about the reportlab-users mailing list