views:

594

answers:

1

Hi I am trying to export a report as CSV format from Crystal Reports 11, but the problem is that each string value is wrapped inside quotes, which I don't want. I tried to set the delimiter as space but it didn't works. Can someone please help me with this..?

Here is my code:

elseif ExportFormat = "CSV" then
ExportType = "5"
ExportFileName = TimeStamp&"_"&Session.SessionID&ReportDN&".CSV" 
crystalExportOptions.DiskFileName = ExportDirectory & ExportFileName
crystalExportOptions.FormatType = CInt(ExportType)
crystalExportOptions.CharStringDelimiter =" "
'crystalExportOptions.FormatType = ExportFormat
crystalExportOptions.DestinationType = CInt(1)
Session("oRpt").Export False  
 Response.ContentType = "text/x-csv"
Response.Redirect "RDCrptserver10.asp?cmd=export&export_fmt=crxf_csv:0" 
A: 

After a overnight hack, I figured that below changes does the trick:

ExportType = "7" crystalExportOptions.CharFieldDelimiter = ","

7 means charSeparatedValues and the only option we set fieldDelimiter as "," so now the strings are not wrapped inside quotes....

Ravi Gupta