共用方式為


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

處理報表並依照指定的格式轉譯它。

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

語法

'宣告
Public Function Render ( _
    format As String, _
    deviceInfo As String, _
    <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()
'用途
Dim instance As Report
Dim format As String
Dim deviceInfo As String
Dim mimeType As String
Dim encoding As String
Dim fileNameExtension As String
Dim streams As String()
Dim warnings As Warning()
Dim returnValue As Byte()

returnValue = instance.Render(format, _
    deviceInfo, mimeType, encoding, fileNameExtension, _
    streams, warnings)
public byte[] Render(
    string format,
    string deviceInfo,
    out string mimeType,
    out string encoding,
    out string fileNameExtension,
    out string[] streams,
    out Warning[] warnings
)
public:
array<unsigned char>^ Render(
    String^ format, 
    String^ deviceInfo, 
    [OutAttribute] String^% mimeType, 
    [OutAttribute] String^% encoding, 
    [OutAttribute] String^% fileNameExtension, 
    [OutAttribute] array<String^>^% streams, 
    [OutAttribute] array<Warning^>^% warnings
)
member Render : 
        format:string * 
        deviceInfo:string * 
        mimeType:string byref * 
        encoding:string byref * 
        fileNameExtension:string byref * 
        streams:string[] byref * 
        warnings:Warning[] byref -> byte[] 
public function Render(
    format : String, 
    deviceInfo : String, 
    mimeType : String, 
    encoding : String, 
    fileNameExtension : String, 
    streams : String[], 
    warnings : Warning[]
) : byte[]

參數

  • format
    型別:System.String
    用來轉譯報表的格式。這個引數對應到轉譯延伸模組。
    在本機處理模式中,支援的格式為 Excel、PDF、Word 和 Image。在遠端處理模式中,支援的延伸模組是由報表伺服器所決定。
    根據處理模式 (請參閱 ProcessingMode),您可以使用 ServerReportLocalReport 中的 ListRenderingExtensions 方法,來存取可用的轉譯延伸模組清單。
  • deviceInfo
    型別:System.String
    包含 format 參數中指定之轉譯延伸模組所需之裝置特定內容的 XML 字串。如需特定輸出格式之裝置資訊設定的詳細資訊,請參閱《SQL Server 線上叢書》中的Device Information Settings
  • mimeType
    型別:System.String%
    [out] 轉譯報表的 MIME 類型。
  • encoding
    型別:System.String%
    [out] 轉譯報表內容時所用的編碼。
  • fileNameExtension
    型別:System.String%
    [out] 輸出檔所用的副檔名。
  • streams
    型別:array<System.String[]%
    [out] 資料流識別碼。您可以利用它們來轉譯與報表相關聯的外部資源 (例如影像)。

傳回值

型別:array<System.Byte[]
指定格式之報表的 Byte 陣列。

備註

請參閱 LocalReportServerReport 實作,以取得特定註解和程式碼範例。

請參閱

參考

Report 類別

Render 多載

Microsoft.Reporting.WebForms 命名空間