PdfRtfWordFormatOptions 類別
提供匯出至 PDF、RTF 或 Word 時的擷取和設定選項屬性。
如需這個類型所有成員的清單,請參閱 PdfRtfWordFormatOptions 成員。
PdfRtfWordFormatOptions
[Visual Basic]
Public Class PdfRtfWordFormatOptions
[C#]
public class PdfRtfWordFormatOptions
[C++]
__gc public class PdfRtfWordFormatOptions
[VJ#]
public class PdfRtfWordFormatOptions
範例
這個範例說明如何在匯出成為 Rich Text 格式時設定 PdfRtfWordFormatOptions 類別。
[Visual Basic]
Private Sub SetFormatOptions(ByVal firstPage As Int32, ByVal lastPage As Int32, ByVal useRange As Boolean)
' 宣告變數並取得匯出選項。
Dim exportOpts As New ExportOptions()
Dim pdfRtfWordOpts As New PdfRtfWordFormatOptions()
' 設定匯出格式。
pdfRtfWordOpts.FirstPageNumber = firstPage
pdfRtfWordOpts.LastPageNumber = lastPage
pdfRtfWordOpts.UsePageRange = useRange
Report.ExportOptions.FormatOptions = pdfRtfWordOpts
Report.ExportOptions.ExportFormatType = _
ExportFormatType.RichText
End Sub
[C#]
private void SetFormatOptions (int firstPage, int lastPage, bool useRange)
{
// 宣告變數並取得匯出選項。
ExportOptions exportOpts = new ExportOptions();
PdfRtfWordFormatOptions pdfRtfWordOpts = new
PdfRtfWordFormatOptions ();
// 設定匯出格式。
pdfRtfWordOpts.FirstPageNumber = firstPage;
pdfRtfWordOpts.LastPageNumber = lastPage;
pdfRtfWordOpts.UsePageRange = useRange;
Report.ExportOptions.FormatOptions = pdfRtfWordOpts;
Report.ExportOptions.ExportFormatType =
ExportFormatType.RichText;
}
[C++]
static void SetFormatOptions (int firstPage, int lastPage, bool useRange)
{
// 宣告變數並取得匯出選項。
ExportOptions* exportOpts = new ExportOptions();
PdfRtfWordFormatOptions* pdfRtfWordOpts = new
PdfRtfWordFormatOptions ();
// 設定匯出格式。
pdfRtfWordOpts->FirstPageNumber = firstPage;
pdfRtfWordOpts->LastPageNumber = lastPage;
pdfRtfWordOpts->UsePageRange = useRange;
Report->ExportOptions->FormatOptions = pdfRtfWordOpts;
Report->ExportOptions->ExportFormatType =
ExportFormatType::RichText;
[VJ#]
private void SetFormatOptions (int firstPage, int lastPage, boolean useRange)
{
// 宣告變數並取得匯出選項。
PdfRtfWordFormatOptions pdfRtfWordOpts = new
PdfRtfWordFormatOptions ();
// 設定匯出格式。
pdfRtfWordOpts.set_FirstPageNumber(firstPage);
pdfRtfWordOpts.set_LastPageNumber(lastPage);
pdfRtfWordOpts.set_UsePageRange(useRange);
Report.get_ExportOptions().set_FormatOptions(pdfRtfWordOpts);
Report.get_ExportOptions().set_ExportFormatType(
ExportFormatType.RichText);
}
需求
**平台:**Windows 98、Windows NT 4.0、Windows Millennium Edition、Windows 2000
**組件:**CrystalDecisions.Shared (CrystalDecisions.Shared.dll)