Information générale
Catégorie:
Produits tierce partie
Titre:
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
Suivant
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