General information
Category:
Reports & Report designer
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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only