[reportlab-users] Re: Refresh of SimpleDocTemplate
Wilgus, Jeff
reportlab-users@reportlab.com
Wed, 30 Apr 2003 14:40:54 -0500
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C30F50.69F6E2B6
Content-Type: text/plain;
charset="iso-8859-1"
Robin,
Sorry, but I did not want to send the whole program.
To your comments specifically:
1) "Elements" is a list defined in my module vReport.py ... it actually is
the "story" that is being passed to the build function ...
doc.build(Elements, onFirstPage=myFirstPage, onLaterPages=myLaterPages) ...
The code that I sent in my original post was showing just the portion of the
code, that portion where the imports for reportlabs objects and the
"Elements" object was initialized (and a PageBreak() appended). Then the
variables which are set to seed the myFirstPage function. etc.
2) The main() then basically goes through a process of calling a two
functions called CreateReport() and AddDataToReport() for each server in a
for loop. The BuildTheReport() funciton was called just once at the end of
the for loop. I want to bring the BuildTheReport() function within the for
loop so one report PDF is created for each server.
3) I've tried re-initializing the "story" ... Elements = [] and append a
PageBreak() ... at the top of the for loop and the results are what I've
described. All Reports create as expected (no errors), but reports 2 - n
"blend" the title page with the first page. It's as if it is recognizing
both "First" and "Later" on that first page.
4) Since the program is using "from" imports, I cannot easily reload() the
reportlabs objects.
I hope this clears things up a little without actually sending the whole
program.
I'd appreciate anything you or anyone else can add.
Thanks so much.
Jeff
------_=_NextPart_001_01C30F50.69F6E2B6
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>Re: Refresh of SimpleDocTemplate</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Robin,</FONT>
</P>
<P><FONT SIZE=3D2>Sorry, but I did not want to send the whole =
program.</FONT>
</P>
<P><FONT SIZE=3D2>To your comments specifically:</FONT>
</P>
<P><FONT SIZE=3D2>1) "Elements" is a list defined in my =
module vReport.py ... it actually is the "story" that is =
being passed to the build function ... doc.build(Elements, =
onFirstPage=3DmyFirstPage, onLaterPages=3DmyLaterPages) ... The =
code that I sent in my original post was showing just the portion of =
the code, that portion where the imports for reportlabs objects and the =
"Elements" object was initialized (and a PageBreak() =
appended). Then the variables which are set to seed the =
myFirstPage function. etc.</FONT></P>
<P><FONT SIZE=3D2>2) The main() then basically goes through a process =
of calling a two functions called CreateReport() and AddDataToReport() =
for each server in a for loop. The BuildTheReport() funciton was =
called just once at the end of the for loop. I want to bring the =
BuildTheReport() function within the for loop so one report PDF is =
created for each server.</FONT></P>
<P><FONT SIZE=3D2>3) I've tried re-initializing the "story" =
... Elements =3D [] and append a PageBreak() ... at the top of the for =
loop and the results are what I've described. All Reports create =
as expected (no errors), but reports 2 - n "blend" the title =
page with the first page. It's as if it is recognizing both =
"First" and "Later" on that first page.</FONT></P>
<P><FONT SIZE=3D2>4) Since the program is using "from" =
imports, I cannot easily reload() the reportlabs =
objects. </FONT>
</P>
<P><FONT SIZE=3D2>I hope this clears things up a little without =
actually sending the whole program.</FONT>
</P>
<P><FONT SIZE=3D2>I'd appreciate anything you or anyone else can =
add.</FONT>
</P>
<P><FONT SIZE=3D2>Thanks so much.</FONT>
</P>
<P><FONT SIZE=3D2>Jeff</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C30F50.69F6E2B6--