[reportlab-users] getKeepWithNext attribute error
Riaan Bekker
riaan.bekker at kapabiosystems.com
Wed Jan 31 01:31:34 EST 2007
Ok, think I found the problem here. I populate the self._flowables with a
list of FRAMES, and as far as I can see FRAMES are not flowables, they are
containers. So when I populated the list with PARAGRAPHS, then it created
the PDF document, although it was empty.
I am not sure how FRAMES and PARAGRAPHS fit together. How do I tell the
document that I have a BASEDOCTEMPLATE with 4 frames (3 columns at top, 1
body frame) and then how to I tell the PARAGRAPHS that it belongs to a
certain FRAME?
At the moment I did the following:
1. Setup a class and derive from BaseDocTemplate.
2. Setup a pageTemplate.
3. Setup Frames
4. Add frames to the pageTemplate
5. Add the pageTemplate to the list of page templates
6. create a flowable list of paragraphs
7. use the build method and send the flowable (full of paragraphs)
The PDF is then still empty. How do I tell the paragraphs to go into certain
frames?
_____
From: reportlab-users-bounces at reportlab.com
[mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Riaan Bekker
Sent: Tuesday, January 30, 2007 3:40 PM
To: reportlab-users at reportlab.com
Subject: [reportlab-users] getKeepWithNext attribute error
Hi All,
As soon as I try to build my report it complains about an attribute error on
the flowables. The flowables are all frames, and as far as I can see the
frames do support the KeepWithNext property. I am totally lost as to where
to start looking for the problem again.
AttributeError: getKeepWithNext
190 frmMain.py: reports.makeDocument(self)
86: reports.pu: doc.build(doc._flowables)
702: doctemplate.py: self.handle_flowable(flowables)
600: doctemplate.py: self.handle_keepWithNext(flowables)
575: doctemplate.py: while i<n and
flowable[i].getKeepWithNext(): += 1
77: frames.py: raise AttributeError, a
The code is added to this e-mail as attachment.
Thank you for the help
Riaan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20070131/205b1955/attachment.htm
More information about the reportlab-users
mailing list