Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Output a report in PDF format
Message
From
18/03/2010 10:52:27
 
 
To
18/03/2010 09:36:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01455338
Message ID:
01455382
Views:
141
I need to output a report in PDF format so that I can email the letter (report) to someone. Is it possible to create a report in PDF format? I've looked at the 'Report form' command and you can only output your report to an ASCII file format.

Download the free Bullzip PDF printer driver from http://www.bullzip.com/products/pdf/info.php

Then you can use code like this to create your PDF:
LOCAL lcPrinter, lcDestFileName, loObj 

lcPrinter = "Bullzip PDF Printer" 
lcDestFileName = "c:\temp\ExampleOut.pdf" 
IF FILE(lcDestFileName) 
  DELETE FILE lcDestFileName 
ENDIF 
*** Create the COM object to control the printer. 
loObj = CREATEOBJECT("BullZIP.PDFPrinterSettings") 
loObj .SetValue("Output",lcDestFileName) 
loObj .SetValue("ShowSettings" ,"never") 
loObj .SetValue("ShowPDF" ,"no") 
loObj .WriteSettings(.t.) 

SET PRINTER TO NAME (lcprinter)
REPORT FORM MyReport TO PRINTER NOCONSOLE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform