ReportExecutionService.Render2 方法

定義

處理特定報告並以指定格式呈現。

public:
 cli::array <System::Byte> ^ Render2(System::String ^ Format, System::String ^ DeviceInfo, ReportExecution2005::PageCountMode PaginationMode, [Runtime::InteropServices::Out] System::String ^ % Extension, [Runtime::InteropServices::Out] System::String ^ % MimeType, [Runtime::InteropServices::Out] System::String ^ % Encoding, [Runtime::InteropServices::Out] cli::array <ReportExecution2005::Warning ^> ^ % Warnings, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % StreamIds);
public byte[] Render2(string Format, string DeviceInfo, ReportExecution2005.PageCountMode PaginationMode, out string Extension, out string MimeType, out string Encoding, out ReportExecution2005.Warning[] Warnings, out string[] StreamIds);
member this.Render2 : string * string * ReportExecution2005.PageCountMode * string * string * string * Warning[] * String[] -> byte[]
Public Function Render2 (Format As String, DeviceInfo As String, PaginationMode As PageCountMode, ByRef Extension As String, ByRef MimeType As String, ByRef Encoding As String, ByRef Warnings As Warning(), ByRef StreamIds As String()) As Byte()

參數

Format
String

報告的格式。 此參數對應到渲染擴充。 支援的擴充功能包括 XML、NULL、CSV、IMAGE、PDF、HTML4.0、HTML3.2、MHTML、Excel 及 Word。 呼叫該 ListRenderingExtensions() 方法可獲得支援擴充功能的清單。

DeviceInfo
String

一個包含參數中指定 Format 渲染擴充所需的裝置特定內容的 XML 字串。 DeviceInfo 設定必須作為 DeviceInfo XML 元素的內部元素傳遞。 欲了解更多特定輸出格式的裝置資訊設定,請參閱「將裝置資訊設定傳遞給渲染擴充」。

PaginationMode
PageCountMode

報告的處理方式。

Extension
String

[出]對應輸出串流的檔案副檔名。

MimeType
String

[出]呈現報告的 MIME 類型。

Encoding
String

[出]報告伺服器渲染報告內容時所使用的編碼方式。

Warnings
Warning[]

[出]一組 Warning 描述報告處理過程中出現的任何警告的物件陣列。

StreamIds
String[]

[出]串流識別碼。 這些 ID 會傳給方法。RenderStream(String, String, String, String, String) 你可以用它們來渲染與報告相關的外部資源(圖片等)。

傳回

Byte[]

報告的 位元組[] 陣列,格式依規定。

備註

下表顯示此操作的標頭與權限資訊。

SOAP 標頭的使用 (在) TrustedUserHeaderValue

(在) ExecutionHeaderValue

(出局) ServerInfoHeaderValue
原生模式所需權限 關於主報告及所有子報告: ReadProperties 以及 ExecuteAndView
SharePoint 模式 必要權限 關於主報告及所有子報告: <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems>

Render2 呈現與標頭中所識別 ExecutionInfo2 的報告執行相關的處理中報告。 若不存在會話快照,此方法將執行報告(若符合所有憑證與參數要求),並建立新的會話快照。 若報告因非查詢參數值改變而需要重新處理,快照將被重新處理。

若執行選項設為快取或執行快照,呼叫 可 Render2 使用現有快照。

若報告設定為快取,且提供的參數值與憑證相符,快照的快取副本可能會被載入,而非實際處理報告。

若憑證與參數要求未達標,此方法將回傳錯誤。

若渲染擴充套件支援指定多個頁面,後續呼叫 可用 Render2 來擷取報告的額外頁面。

Render 方法的一個限制是輸出無法串流,因此整個檔案必須在記憶體中。

請參閱 「識別執行狀態 」一節,討論執行生命週期,其中包含載入與呈現報告所需步驟的說明。

適用於