Try commenting the line that says:
oCrRpt.DiscardSavedData()
I think it should solve the problem.
Luis
>I have this code:
>
>PUBLIC oCr, cCrDatak, oCrTables, oExportOptions
>
>* Create the CR Object
>oCr = CREATEOBJECT("CrystalRuntime.Application")
>
>* Open the report
>oCrRpt = oCr.OpenReport("Performance.Rpt")
>
>* Set the data location
>oCrData = oCrRpt.Database
>oCrTables = oCrData.Tables
>oCrTables.Item(1).Location = "c:\mtstemp\performance.dbf"
>
>* Set the export options
>oExportOptions = oCrRpt.ExportOptions
>oExportOptions.DestinationType = 5 && Application
>oExportOptions.FormatType = 21 && crEFTExcel50
>
>* Export the file
>oCrRpt.DiscardSavedData()
>oCrRpt.Export(.F.)
>
>RETURN
>
>>When it hits the
oCrRpt.Export(.F.) line, it errors with "Invalid Direcotry"
>
>The folders are there, as are all the files.
>
>Thanks