Hi:
 
 I try to use Reportlab lib's with my zope. 
 
 In my DTML method i call the python file (External Method) with:
 
 <dtml-call "makereport">
 
 All run OK, but i don't find the *pdf file.
 
 Where is my pdf file? 

##########################3
#      makereport.py
##########################3

import string
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.pagesizes import A3, landscape 
from reportlab.pdfgen.textobject import PDFTextObject
from types import *
import MySQL

x=y=100
turmaa = 'Michael'
DBH = MySQL.connect("localhost","aa","bb")
DBH.selectdb("school")
query= ("select score from exam where name= %s") % repr(turmaa) 
STH1= DBH.query(query)
Scores= STH1.fetchrows(-1)
c = Canvas("score.pdf", pagesize=landscape(A3), bottomup=0)
c.setFont("Times-Bold", 12.0, leading=10.0)
for scor in range(len(Scores)): 
        c.drawString(x, y, Scores[scor][0])
        y = y + 15
c.showPage()
c.save()
DBH.close()

 
 
 thanks in advance
 
 have a nice day
 
 Jorge
 
 


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to