General information
Category:
Third party products
Title:
Crystal to pdf with vfp6 code
i need some code that will send a crystal 8.5 report to a pdf file with vfp6. can't seem to get it to work yet. got this from somewhere and cant seem to get the right "formattype" i think? thanks in advance.
* Create the CR Object
loCr = CREATEOBJECT("CrystalRuntime.Application")
* Open the report
loCrRpt = loCr.OpenReport("C:\My Documents\Report.rpt")
* Set the data location
loCrData = loCrRpt.Database
loCrTables = loCrData.Tables
loCrTables.Item(1).Location = "C:\CR\Customer.DBF"
* Set the export options
loExportOptions = loCrRpt.ExportOptions
loExportOptions.DestinationType = 1 && crEDTDiskFile
loExportOptions.FormatType = ??????
loExportOptions.DiskFileName = "C:\Export.pdf"
* Export the file
loCrRpt.DiscardSavedData()
loCrRpt.Export(.F.)
* Manual garbage collection
loExportOptions = NULL
loCrTables = NULL
loCrData = NULL
loCrRpt = NULL
loCr = NULL
Next
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