Skip to Content
0
Former Member
May 13, 2011 at 02:22 AM

CharacterSeparatedValuesFormatOptions Is ignored

23 Views

Hello,

Here is some sample VB.net code where I can not get CR 2008 to use the options in CharacterSeparatedValuesFormatOptions. Does anyone see what I am doing wrong?

Sub Main()

Dim crReportDocument As New ReportDocument()

Dim crExportOptions As New ExportOptions()

crReportDocument.Load("C:\temp\quotetest.rpt")

Dim CVSoptions As CharacterSeparatedValuesFormatOptions

CVSoptions = ExportOptions.CreateCharacterSeparatedValuesFormatOptions()

crExportOptions.ExportFormatType = ExportFormatType.CharacterSeparatedValues

Dim crDiskFileDestinationOptions As DiskFileDestinationOptions = ExportOptions.CreateDiskFileDestinationOptions()

crReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile

CVSoptions.Delimiter = "%"

CVSoptions.SeparatorText = "#"

crReportDocument.ExportOptions.ExportFormatOptions = CVSoptions

crDiskFileDestinationOptions.DiskFileName = "c:
temp
CharacterSeperatedValues.rtf"

crExportOptions.ExportDestinationOptions = crDiskFileDestinationOptions

crExportOptions.ExportFormatOptions = CVSoptions

crExportOptions.ExportFormatType = ExportFormatType.CharacterSeparatedValues

crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile

crReportDocument.Export(crExportOptions)

End Sub

Thank you in advance for your help.

Zeller