Skip to Content
0
Former Member
Feb 11, 2011 at 01:08 PM

How to set export options when using ExportToStream() in CR for VS 2010 ?

867 Views

How to set export options when using ExportToStream() in CR for VS 2010 ?

My code:

ReportDocument rpt = report.Content as ReportDocument;

ExportOptions options = new ExportOptions();

options.ExportFormatType = ExportFormatType.CharacterSeparatedValues

var formatOptions = new CharacterSeparatedValuesFormatOptions();

formatOptions.GroupSectionsOption= CsvExportSectionsOption.ExportIsolated;

options.ExportFormatOptions = formatOptions;

System.IO.Stream stream = rpt.ExportToStream( options ); // <---- I can't pass options for method ExportToStream()