Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Exporting CR9 as CSV

Status
Not open for further replies.

rangerstud620

Programmer
Sep 17, 2003
34
US
I've got a program that exports a Crystal Report as a CSV. Sometimes, but not always, I get a Run-Time error '-2147206396' Definition: Selected collating sequence not supported by the operating system. When I press Debug and then continue running the program, everything works fine. Below is the code I have in the program:

'Open report
Set Application = CreateObject("CrystalRuntime.application.9")
Set Report = Application.OpenReport("M:\VB Programs\Reports\Input Proofer\EclipseExport.rpt")
Set ExportOptions = Report.ExportOptions

'Set report spreadsheet location
Report.Database.Tables(1).SetTableLocation strOpenExcel, "", "Sheet1"
Report.Database.Verify

'Set report export properties
Report.ExportOptions.DestinationType = crEDTDiskFile
Report.ExportOptions.DiskFileName = Mid(strOpenExcel, InStrRev(strOpenExcel, "\", -1) + 1, InStrRev(strOpenExcel, ".", -1) - (InStrRev(strOpenExcel, "\", -1) + 1)) & ".qa1"
Report.ExportOptions.FormatType = crEFTCommaSeparatedValues
Report.Export False 'This is what is highlighted
'when I press Debug

Does anyone have any ideas as to what the problem may be? Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top