Export CSV file to Crystal Report 11

Hi I'm trying to export a CSV report from Crystal Reports 11, but the problem is each string value is wrapped inside quotes, which is not what I want. I tried to set the delimiter as space, but it didn't work. 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" 

      

+2


source to share


1 answer


After an overnight hack, I figured out that below changes do the trick:

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



7 means charSeparatedValues ​​and the only parameter we set fieldDelimiter to be "," so now strings are not enclosed inside quotes ....

0


source







All Articles