HTMLFormatOptions 类
提供属性,以便检索和设置导出到 HTML 时的选项。
有关该类型所有成员的列表,参见 HTMLFormatOptions 成员。
System.Object
CrystalDecisions.Shared.ExportFormatOptions
HTMLFormatOptions
[Visual Basic]
Public Class HTMLFormatOptions Implements ICloneable
[C#]
public class HTMLFormatOptions : ICloneable
备注
HTMLFileName 属性与 DiskFileDestinationOptions 对象的 DiskFileName 属性必须匹配。
示例
该示例说明如何用以设置 HTMLFormatOptions 类的某些属性。代码首先申明变量并获取导出选项。然后,方法在导出报表前设置 HTML 格式选项和目标选项。
[Visual Basic] Private Sub ExportToHTML(ByVal file As String, ByVal _ seperatePages As Boolean, ByVal pageNavigator As Boolean) Dim htmlOpts As HTMLFormatOptions = ExportOptions.CreateHTMLFormatOptions() Dim diskOpts As DiskFileDestinationOptions = ExportOptions.CreateDiskFileDestinationOptions() Dim exportOpts As New ExportOptions() htmlOpts.HTMLFileName = file htmlOpts.HTMLEnableSeparatedPages = seperatePages htmlOpts.HTMLHasPageNavigator = pageNavigator exportOpts.ExportFormatOptions = htmlOpts diskOpts.DiskFileName = file exportOpts.ExportDestinationOptions = diskOpts exportOpts.ExportDestinationType = _ ExportDestinationType.DiskFile exportOpts.ExportFormatType = _ ExportFormatType.HTML40 Report.Export(exportOpts) End Sub
[C++] private static void ExportToHTML (string file, bool seperatePages, bool pageNavigator) { HTMLFormatOptions htmlOpts = ExportOptions.CreateHTMLFormatOptions(); DiskFileDestinationOptions diskOpts = ExportOptions.CreateDiskFileDestinationOptions(); ExportOptions exportOpts = new ExportOptions(); htmlOpts.HTMLFileName = file; htmlOpts.HTMLEnableSeparatedPages = seperatePages; htmlOpts.HTMLHasPageNavigator = pageNavigator; exportOpts.ExportFormatOptions = htmlOpts; diskOpts.DiskFileName = file; exportOpts.ExportDestinationOptions = diskOpts; exportOpts.ExportDestinationType = ExportDestinationType.DiskFile; exportOpts.ExportFormatType = ExportFormatType.HTML40; Report.Export(exportOpts); }
[C#] static void ExportToHTML (String* file, bool seperatePages, bool pageNavigator) { HTMLFormatOptions* htmlOpts = ExportOptions::CreateHTMLFormatOptions(); DiskFileDestinationOptions* diskOpts = ExportOptions::CreateDiskFileDestinationOptions(); ExportOptions* exportOpts = new ExportOptions(); htmlOpts->HTMLFileName = file; htmlOpts->HTMLEnableSeparatedPages = seperatePages; htmlOpts->HTMLHasPageNavigator = pageNavigator; exportOpts->ExportFormatOptions = htmlOpts; diskOpts->DiskFileName = file; exportOpts->ExportDestinationOptions = diskOpts; exportOpts->ExportDestinationType = ExportDestinationType::DiskFile; exportOpts->ExportFormatType = ExportFormatType::HTML40; Report->Export(exportOpts); }
要求
程序集 CrystalDecisions.Shared (CrystalDecisions.Shared.dll)
请参见
HTMLFormatOptions 成员 | CrystalDecisions.Shared 命名空间
©2005 Business Objects SA 保留所有权利。
Business Objects SA http://www.china.businessobjects.com/ 支持服务 http://www.china.businessobjects.com/ |