共用方式為


ExchangeFolderDestinationOptions 類別

提供匯出至 Microsoft Exchange 資料夾時的擷取和設定選項屬性。

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

Object

   ExchangeFolderDestinationOptions

[Visual Basic]

Public Class ExchangeFolderDestinationOptions

[C#]

public class ExchangeFolderDestinationOptions

[C++]

__gc public class ExchangeFolderDestinationOptions

[VJ#]

public class ExchangeFolderDestinationOptions

範例

這個範例說明如何設定 ExchangeFolderDestinationOptions 類別的某些屬性。

[Visual Basic]

Private Sub ExportToExchange(ByVal folder As String, _
ByVal profile As String, ByVal password As String)

   Dim exchangeOpts = New ExchangeFolderDestinationOptions()

   ' 設定交換目的端選項。
   exchangeOpts.DestinationType = _ 
   ExchangeDestinationType.ExchangeFolderType

   exchangeOpts.FolderPath = folder
   exchangeOpts.Profile = profile
   exchangeOpts.Password = password
   Report.ExportOptions.DestinationOptions = exchangeOpts

   ' 設定磁碟檔案選項並匯出。
   Report.ExportOptions.ExportDestinationType = _ 
   ExportDestinationType.DiskFile
   Report.ExportOptions.ExportFormatType = ExportFormatType.Excel

   Report.Export()
End Sub

[C#]

private void ExportToExchange (string folder, string profile, string password)
{
   ExchangeFolderDestinationOptions exchangeOpts = new 
   ExchangeFolderDestinationOptions ();

   // 設定交換目的端選項。
   exchangeOpts.DestinationType = 
   ExchangeDestinationType.ExchangeFolderType;

   exchangeOpts.FolderPath = folder;
   exchangeOpts.Profile = profile;
   exchangeOpts.Password = password;
   Report.ExportOptions.DestinationOptions = exchangeOpts;

   // 設定磁碟檔案選項並匯出。
   Report.ExportOptions.ExportDestinationType =    
   ExportDestinationType.DiskFile;
   Report.ExportOptions.ExportFormatType = 
   ExportFormatType.Excel;

   Report.Export ();
}

[C++]

static void ExportToExcel (String* fileName, bool hasColumnHeaders, double columnWidth)
{
   ExcelFormatOptions* excelFormatOpts = 
   new ExcelFormatOptions ();
   DiskFileDestinationOptions* diskOpts = 
   new DiskFileDestinationOptions();

   // 設定 Excel 格式選項。
   excelFormatOpts->ExcelTabHasColumnHeadings = true;
   excelFormatOpts->ExcelUseConstantColumnWidth = 
   hasColumnHeaders;
   excelFormatOpts->ExcelConstantColumnWidth = columnWidth;
   Report->ExportOptions->ExportFormatType = 
   ExportFormatType::Excel;
   Report->ExportOptions->FormatOptions = excelFormatOpts;

   // 設定磁碟檔案選項並匯出。
   Report->ExportOptions->ExportDestinationType = 
   ExportDestinationType::DiskFile;
   diskOpts->DiskFileName = fileName;
   Report->ExportOptions->DestinationOptions = diskOpts;

   Report->Export ();
};

[VJ#]

private void ExportToExchange (String folder, String profile, String password)
{
   ExchangeFolderDestinationOptions exchangeOpts = new 
   ExchangeFolderDestinationOptions ();

   // 設定交換目的端選項。
   exchangeOpts.set_DestinationType( 
   ExchangeDestinationType.ExchangePostDocMessage);

   exchangeOpts.set_FolderPath(folder);
   exchangeOpts.set_Profile(profile);
   exchangeOpts.set_Password(password);
   Report.get_ExportOptions().set_DestinationOptions( exchangeOpts);

   // 設定磁碟檔案選項並匯出。
   Report.get_ExportOptions().set_ExportDestinationType(    
   ExportDestinationType.DiskFile);
   Report.get_ExportOptions().set_ExportFormatType( 
   ExportFormatType.Excel);

   Report.Export ();
}

需求

命名空間:CrystalDecisions.Shared

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

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

請參閱

ExchangeFolderDestinationOptions 成員 | CrystalDecisions.Shared 命名空間