Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal to pdf with vfp6 code
Message
De
28/11/2001 21:10:08
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
Crystal to pdf with vfp6 code
Divers
Thread ID:
00587305
Message ID:
00587305
Vues:
57
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
Fil
Voir

Click here to load this message in the networking platform