Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another Crystal Question
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00629623
Message ID:
00636330
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform