LocalReport.Render 方法 (String, String, PageCountMode, String, String, String, String[], Warning[])

 

使用指定的頁面計數模式來處理報表,並依照指定的格式轉譯該報表。

命名空間:   Microsoft.Reporting.WinForms
組件:  Microsoft.ReportViewer.WinForms (於 Microsoft.ReportViewer.WinForms.dll)

語法

public override byte[] Render(
    string format,
    string deviceInfo,
    PageCountMode pageCountMode,
    out string mimeType,
    out string encoding,
    out string fileNameExtension,
    out string[] streams,
    out Warning[] warnings
)
public:
virtual array<unsigned char>^ Render(
    String^ format,
    String^ deviceInfo,
    PageCountMode pageCountMode,
    [OutAttribute] String^% mimeType,
    [OutAttribute] String^% encoding,
    [OutAttribute] String^% fileNameExtension,
    [OutAttribute] array<String^>^% streams,
    [OutAttribute] array<Warning^>^% warnings
) override
override Render : 
        format:string *
        deviceInfo:string *
        pageCountMode:PageCountMode *
        mimeType:string byref *
        encoding:string byref *
        fileNameExtension:string byref *
        streams:string[] byref *
        warnings:Warning[] byref -> byte[]
Public Overrides Function Render (
    format As String,
    deviceInfo As String,
    pageCountMode As PageCountMode,
    <OutAttribute> ByRef mimeType As String,
    <OutAttribute> ByRef encoding As String,
    <OutAttribute> ByRef fileNameExtension As String,
    <OutAttribute> ByRef streams As String(),
    <OutAttribute> ByRef warnings As Warning()
) As Byte()

參數

  • format
    Type: System.String

    用來轉譯報表的格式。 這個引數對應到轉譯延伸模組。 支援的格式包括 Excel、PDF、Word 和 Image。

    若要存取可用的轉譯延伸模組,請使用 ListRenderingExtensions 方法。

  • deviceInfo
    Type: System.String

    包含 format 參數指定的轉譯延伸模組所需要之裝置特定內容的 XML 字串。 如需特定輸出格式之裝置資訊設定的詳細資訊,請參閱《SQL Server 線上叢書》中的<裝置資訊設定>。

  • mimeType
    Type: System.String

    [out] 轉譯報表的 MIME 類型。

  • encoding
    Type: System.String

    [out] 轉譯報表內容時所用的編碼。

  • fileNameExtension
    Type: System.String

    [out] 輸出檔所用的副檔名。

  • streams
    Type: System.String[]

    [out] 資料流識別碼。 您可以利用它們來轉譯關聯於報表的外部資源 (如影像)。

傳回值

Type: System.Byte[]

使用指定格式之報表的 Byte 陣列。

註解

This method can be used to export and print a report.

After this method completes successfully, the value of pageCountMode determines the default page count mode the LocalReport object uses when you call the M:Microsoft.Reporting.WinForms.LocalReport.GetTotalPages method. For more information, see GetTotalPages.

另請參閱

Render 多載
LocalReport 類別
Microsoft.Reporting.WinForms 命名空間

回到頁首