cancel
Showing results for 
Search instead for 
Did you mean: 

Thousand separator

former_member1012208
Participant
0 Kudos
94

I am using the following code to export crystal report to a text file. My problem is when there are currency values, the exported text file adds the thousand separator. In Crystal I have removed it in the options menu and when I export from designer the thousand separator is not there.
I don't know why it is being added when I export it with the code.

{code}

Dim myReport As New ReportDocument
myReport.Load(ReportNameAndPath)

Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New CharacterSeparatedValuesFormatOptions ' ExcelFormatOptions
CrFormatTypeOptions.SeparatorText = ""
CrFormatTypeOptions.Delimiter = ""
CrFormatTypeOptions.ExportMode = CsvExportMode.Standard
CrFormatTypeOptions.ReportSectionsOption = CsvExportSectionsOption.ExportIsolated
CrFormatTypeOptions.GroupSectionsOption = CsvExportSectionsOption.ExportIsolated
CrDiskFileDestinationOptions.DiskFileName = tmpTxtfile
CrExportOptions = myReport.ExportOptions
With CrExportOptions
    .ExportDestinationType = ExportDestinationType.DiskFile
    .ExportFormatType = ExportFormatType.CharacterSeparatedValues
    .DestinationOptions = CrDiskFileDestinationOptions
    .FormatOptions = CrFormatTypeOptions
End With
myReport.Export()

(code}

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Don,

What version of Cr and VS are you using?

Thanks

Don

former_member1012208
Participant
0 Kudos

I tried it with CR2008 vs VS2005 and VS2010

0 Kudos

Hi Don,

What are you using to view the CSV output file? I don't see it in any version.

Excel may have a default option to format the field that way when viewed.

Don

Answers (0)