Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Another Crystal Question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00629623
Message ID:
00636330
Vues:
16
I'll look at this in more detail later tonight when I have more time and then get back to you.


>Craig,
>
>I have downloaded your Crystal Export example from your web site. I Changed
>the name of the report, and the table, and when I run it, it dies on the
>loCrRpt.Export(.F.) line.
>
>If I remove the .F. from the loCrRpt.Export(.F.) command, I get prompted and it exports to excel
>just fine. If I have the .F. in the command, it errors with the an OLE
>error "Invalid Directory..."
>
>Here's my code
>
>
>* Create the CR Object
>loCr = CREATEOBJECT("CrystalRuntime.Application")
>
>* Open the report
>loCrRpt = loCr.OpenReport("reports\crystal\station performance.rpt")
>
>* Set the data location
>loCrData = loCrRpt.Database
>loCrTables = loCrData.Tables
>loCrTables.Item(1).Location = "c:\mtstemp\performance.dbf"
>
>* Set the export options
>loExportOptions = loCrRpt.ExportOptions
>loExportOptions.DestinationType = 5 && crEDTDiskFile
>loExportOptions.FormatType = 29 && crEFTExcel80
>loExportOptions.DiskFileName = "c:\mtstemp\performance.dbf"
>
>* Export the file
>loCrRpt.DiscardSavedData()
>loCrRpt.Export()
>
>* Manual garbage collection
>loExportOptions = NULL
>loCrTables = NULL
>loCrData = NULL
>loCrRpt = NULL
>loCr = NULL
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform