共用方式為


DiskFileDestinationOptions 類別

提供匯出至磁碟時的擷取和設定檔名屬性。

如需這個類型所有成員的清單,請參閱 DiskFileDestinationOptions 成員

Object

   DiskFileDestinationOptions

[Visual Basic]

Public Class DiskFileDestinationOptions

[C#]

public class DiskFileDestinationOptions

[C++]

__gc public class DiskFileDestinationOptions

[VJ#]

public class DiskFileDestinationOptions

範例

這個範例說明如何使用 DiskFileDestinationOptions 類別。

[Visual Basic]

Private Sub ExportToDisk(ByVal fileName As String)

   Dim diskOpts As New DiskFileDestinationOptions()

   '設定匯出格式
   Report.ExportOptions.ExportFormatType = _ 
   ExportFormatType.RichText
   Report.ExportOptions.ExportDestinationType = _ 
   ExportDestinationType.DiskFile

   '設定磁碟檔案選項
   diskOpts.DiskFileName = fileName
   Report.ExportOptions.DestinationOptions = diskOpts

   Report.Export()
End Sub

[C#]

private void ExportToDisk (string fileName)
{
   DiskFileDestinationOptions diskOpts = new
   DiskFileDestinationOptions();

   // 設定匯出格式
   Report.ExportOptions.ExportFormatType =
   ExportFormatType.RichText;
   Report.ExportOptions.ExportDestinationType = 
   ExportDestinationType.DiskFile;

   // 設定磁碟檔案選項
   diskOpts.DiskFileName = fileName;
   Report.ExportOptions.DestinationOptions = diskOpts;

   Report.Export ();
}

[C++]

static void ExportToDisk (String* fileName)
{
   DiskFileDestinationOptions* diskOpts = new
   DiskFileDestinationOptions;

   // 設定匯出格式
   Report->ExportOptions->ExportFormatType = 
   ExportFormatType::RichText;
   Report->ExportOptions->ExportDestinationType = 
   ExportDestinationType::DiskFile;

   // 設定磁碟檔案選項
   diskOpts->DiskFileName = fileName;
   Report->ExportOptions->DestinationOptions = diskOpts;

   Report->Export ();
}

[VJ#]

private void ExportToDisk (String fileName)
{
   DiskFileDestinationOptions diskOpts = new
   DiskFileDestinationOptions();

   // 設定匯出格式
   Report.get_ExportOptions().set_ExportFormatType(
   ExportFormatType.RichText);
   Report.get_ExportOptions().set_ExportDestinationType( 
   ExportDestinationType.DiskFile);

   // 設定磁碟檔案選項
   diskOpts.set_DiskFileName(fileName);
   Report.get_ExportOptions().set_DestinationOptions(diskOpts);

   Report.Export ();
}

需求

命名空間:CrystalDecisions.Shared

**平台:**Windows 98、Windows NT 4.0、Windows Millennium Edition、Windows 2000

**組件:**CrystalDecisions.Shared (CrystalDecisions.Shared.dll)

請參閱

DiskFileDestinationOptions 成員 | CrystalDecisions.Shared 命名空間