Information générale
Catégorie:
Gestionnaire de rapports & Rapports
I do this all the time. You will want to set your default printer to adobe.
SET CLASSLIB TO {Your location}\classes\utils.vcx
THISFORM.ADDOBJECT('ModiIni', 'CusIniFile',;
"c:\WINNT\system32spool\drivers\w32x86\2\__pdf.ini")
** Programmatically change the file name
pdffilename = {whatever you want the file to be called along with the location}
THISFORM.ModiIni.SetSetting("Acrobat PDFWriter", "PdfFileName", ;(m.FullFileName))
THISFORM.ModiIni.SetSetting("Acrobat PDFWriter", "bDocInfo", "0")
** Crystal calls
loApp = CREATEOBJECT("Crystal.CRPE.Application")
loReport = loApp.openreport("report.rpt")
loReport.DATABASE.verify
loReport.Printout(.F.,1)
Hope this helps!
>We are trying to print a Crystal Reports .rpt to a .PDF file. We are having a problem finding good documentation. Has anyone done this that is willing to share the code to open a Crystal .rpt and SET PRINTER to 'Acrobat PDFWriter' to write to a file on the hard drive?
>
>Thanks in advance.
>Steve McMahon
>ZDI
>San Diego
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement