Report.Render 方法 (String, String, PageCountMode, String, String, String, String[], Warning[])
發行︰ 2016年4月
使用指定的 PageCountMode 值來處理報表,並依照指定的格式轉譯該報表。
命名空間: Microsoft.Reporting.WinForms
組件: Microsoft.ReportViewer.WinForms (於 Microsoft.ReportViewer.WinForms.dll)
語法
public abstract 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
) abstract
abstract Render :
format:string *
deviceInfo:string *
pageCountMode:PageCountMode *
mimeType:string byref *
encoding:string byref *
fileNameExtension:string byref *
streams:string[] byref *
warnings:Warning[] byref -> byte[]
Public MustOverride 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。在遠端處理模式中,支援的延伸模組是由報表伺服器所決定。
根據處理模式 (請參閱 ProcessingMode),您可以使用 ServerReport 或 LocalReport 中的 ListRenderingExtensions 方法,來存取可用的轉譯延伸模組清單。
deviceInfo
Type: System.String包含 format 參數中指定之轉譯延伸模組所需之裝置特定內容的 XML 字串。如需特定輸出格式之裝置資訊設定的詳細資訊,請參閱《SQL Server 線上叢書》中的<裝置資訊設定>。
pageCountMode
Type: Microsoft.Reporting.WinForms.PageCountMode指定頁面計數模式的 PageCountMode 列舉值。
mimeType
Type: System.String[out] 轉譯報表的 MIME 類型。
encoding
Type: System.String[out] 轉譯報表內容時所用的編碼。
fileNameExtension
Type: System.String[out] 輸出檔所用的副檔名。
streams
Type: System.String[][out] 資料流識別碼。您可以利用它們來轉譯關聯於報表的外部資源 (影像等)。
warnings
Type: Microsoft.Reporting.WinForms.Warning[][out] Warning 物件的陣列,描述報表處理期間所發生的任何警告。
傳回值
Type: System.Byte[]
指定格式之報表的 byte 陣列。
註解
如需 pageCountMode 參數對總頁數之影響的詳細資訊,請參閱 GetTotalPages 方法。
另請參閱
Render 多載
Report 類別
Microsoft.Reporting.WinForms 命名空間
回到頁首