水晶报表基础入门——7.晶报表导出数据技术2
(2)ExportDestinationOptions属性
获取或设置报表的导出目标选项。
语法:
publicExportDestinationOptions ExportDestinationOptions {get; set;}
(3)ExportDestinationType属性
获取或设置导出目标类型。
public ExportDestinationType ExportDestinationType {get; set;}
ExportDestinationType是一个枚举类型,指定ExportOptions类的ExportDestinationType属性中的导出目标类型。ExportDestinationType枚举的值及说明如表6.8所示。
表6.8 ExportDestinationType枚举的值及说明
成员
|
说明
|
DiskFile
|
导出目标指向磁盘文件
|
ExchangeFolder
|
导出目标指向交换文件夹
|
MicrosoftMail
|
导出目标指向Microsoft mail (MAPI)
|
NoDestination
|
未设置导出目标类型
|
(4)ExportFormatOptions属性
获取或设置 FormatOptions。
Public ExportFormatOptions ExportFormatOptions {get; set;}
ExportFormatOptions对象包括DiskFileDestinationOptions、ExchangeFolderDestinationOptions或MicrosoftMailDestinationOptions对象,其用法与说明请参见DestinationOptions属性。
(5)ExportFormatType属性
public ExportFormatType ExportFormatType {get; set;}
ExportFormatType是一个枚举值,指定ExportOptions类的ExportFormatType属性中的导出格式类型。
ExportOptions对象常用的方法及说明如表6.9所示。
表6.9 ExportOptions对象常用的方法及说明
方法
|
说明
|
ExcelAreaGroupNumber
|
获取或设置基区域组号(如果该区域类型是组区域)
|
ExcelAreaType
|
获取或设置区域类型(如果不使用固定列宽度)
|
ExcelConstantColumnWidth
|
获取或设置列宽度
|
ExcelTabHasColumnHeadings
|
获取或设置到Excel的导出,以具有列标题选项
|
ExcelUseConstantColumnWidth
|
获取或设置到 Excel 的导出以使用固定列宽度
|
FirstPageNumber
|
获取或设置首页页码
|
LastPageNumber
|
获取或设置末页页码
|
UsePageRange
|
获取或设置是否应使用页面范围
|
下面对比较重要的方法进行详细介绍。
(1)ExcelAreaGroupNumber方法
获取或设置基区域组号(如果该区域类型是组区域)。
语法:
public System.Int16 ExcelAreaGroupNumber {get; set;}
(2)ExcelAreaType方法
获取或设置区域类型(如果不使用固定列宽度)。
语法:
public AreaSectionKind ExcelAreaType {get; set;}
AreaSectionKind是一个枚举类型值,指定Area类和Section类的Kind属性以及ExcelFormatOptions类的ExcelAreaType属性中的区域或节类型。AreaSectionKind枚举值及说明如表6.10所示。
表6.10 AreaSectionKind枚举值及说明
成员
|
说明
|
Detail
|
区域为详细资料部分
|
GroupFooter
|
区域为组页脚
|
GroupHeader
|
区域为组页眉
|
PageFooter
|
区域为页脚
|
PageHeader
|
区域为页眉
|
ReportFooter
|
区域为报表页脚
|
ReportHeader
|
区域为报表页眉
|
(3)ExcelConstantColumnWidth方法
获取或设置列宽度。
语法:
public System.Double ExcelConstantColumnWidth {get; set;}
(4)ExcelTabHasColumnHeadings方法
获取或设置到Excel的导出,以具有列标题选项。
语法:
public bool ExcelTabHasColumnHeadings {get; set;}
(5)ExcelUseConstantColumnWidth方法
获取或设置到Excel的导出以使用固定列宽度。
语法:
public bool ExcelUseConstantColumnWidth{get; set;}
(6)FirstPageNumber方法
获取或设置首页页码。
Public int FirstPageNumber {get; set;}
(7)LastPageNumber方法
获取或设置末页页码。
public int LastPageNumber {get; set;}
(8)UsePageRange方法
获取或设置是否应使用页面范围。
语法:
public bool UsePageRange{get; set;}