I am trying to automate the export of a crystal reports version 9.2.2 report to a CSV file from a vb script. I tried both ExportOptions.FormatType = 7 and 5 but both give me strange results in the output file. When I export the report manually from Crystal, it prompts me for format and I select "Separated Values (CSV), then it prompts me for Destination and I select "Disk File". Then it goes to another prompt box and asks for Separated Values for which I select the defaults:
Separated Character = ,
Delimited = "
Then a new prompt box asks for “Number and Date Format Settings” and I need to check both prompts.
I am trying to automate this in a vbs and I can't find the appropriate ExportOption settings. below are the ones I found and when i run it using just those, i am getting a csv output file but it has data in each field like report title and other garbage that i don't want. Anybody have any thoughts on this?
Here are my current settings:
orpt.ExportOptions.DestinationType = 1
orpt.ExportOptions.FormatType = 5
orpt.ExportOptions.UseReportDateFormat = True
orpt.ExportOptions.UseReportNumberFormat = True
Thanks, dgr
Separated Character = ,
Delimited = "
Then a new prompt box asks for “Number and Date Format Settings” and I need to check both prompts.
I am trying to automate this in a vbs and I can't find the appropriate ExportOption settings. below are the ones I found and when i run it using just those, i am getting a csv output file but it has data in each field like report title and other garbage that i don't want. Anybody have any thoughts on this?
Here are my current settings:
orpt.ExportOptions.DestinationType = 1
orpt.ExportOptions.FormatType = 5
orpt.ExportOptions.UseReportDateFormat = True
orpt.ExportOptions.UseReportNumberFormat = True
Thanks, dgr