Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal to pdf with vfp6 code
Message
From
28/11/2001 21:10:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Crystal to pdf with vfp6 code
Miscellaneous
Thread ID:
00587305
Message ID:
00587305
Views:
56
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
Map
View

Click here to load this message in the networking platform