共用方式為


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

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

命名空間:  Microsoft.Reporting.WebForms
組件:  Microsoft.ReportViewer.WebForms (在 Microsoft.ReportViewer.WebForms.dll 中)

語法

'宣告
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()
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
abstract Render : 
        format:string * 
        deviceInfo:string * 
        pageCountMode:PageCountMode * 
        mimeType:string byref * 
        encoding:string byref * 
        fileNameExtension:string byref * 
        streams:string[] byref * 
        warnings:Warning[] byref -> byte[] 
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 override function Render(
    format : String, 
    deviceInfo : String, 
    pageCountMode : PageCountMode, 
    mimeType : String, 
    encoding : String, 
    fileNameExtension : String, 
    streams : String[], 
    warnings : Warning[]
) : byte[]

參數

  • format
    類型:String
    用來轉譯報表的格式。這個引數對應到轉譯延伸模組。支援的格式包括 Excel、PDF、Word 和 Image。
    若要存取可用的轉譯延伸模組,請使用 ListRenderingExtensions 方法。
  • deviceInfo
    類型:String
    包含 format 參數指定的轉譯延伸模組所需要之裝置特定內容的 XML 字串。如需特定輸出格式之裝置資訊設定的詳細資訊,請參閱《SQL Server 線上叢書》中的<裝置資訊設定>。
  • mimeType
    類型:String%
    [out] 轉譯報表的 MIME 類型。
  • encoding
    類型:String%
    [out] 轉譯報表內容時所用的編碼。
  • fileNameExtension
    類型:String%
    [out] 輸出檔所用的副檔名。
  • streams
    類型:array<String[]%
    [out] 資料流識別碼。您可以利用它們來轉譯關聯於報表的外部資源 (如影像)。

傳回值

類型:array<Byte[]
使用指定格式之報表的 Byte 陣列。

備註

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

After this method completes successfully, the value of pageCountMode affects the page count mode the LocalReport object uses when you call the GetTotalPages method. For more information, see GetTotalPages.

請參閱

參考

LocalReport 類別

Render 多載

Microsoft.Reporting.WebForms 命名空間