Execution Service. Render2 Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Processes a specific report and renders it in the specified format.
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()
The format in which to render the report. This argument maps to a rendering extension. Supported extensions include XML, NULL, CSV, IMAGE, PDF, HTML4.0, HTML3.2, MHTML, EXCEL, and Word. A list of supported extensions may be obtained by calling the ListRenderingExtensions() method.
An XML string that contains the device-specific content that is required by the rendering extension specified in the
Format parameter. DeviceInfo settings must be passed as internal elements of a DeviceInfo XML element. For more information about device information settings for specific output formats, see Passing Device Information Settings to Rendering Extensions.
The mode by which the report is processed.
[out] The file extension corresponding to the output stream.
[out] The MIME type of the rendered report.
[out] The encoding used when report server renders the contents of the report.
[out] An array of Warning objects that describes any warnings that occurred during report processing.
[out] The stream identifiers. These IDs are passed to the RenderStream(String, String, String, String, String) method. You can use them to render the external resources (images, etc.) that are associated with a given report.
A Byte array of the report in the specified format.
The table below shows header and permissions information on this operation.
|SOAP Header Usage||(In) TrustedUserHeaderValue
|Native Mode Required Permissions||On the main report and all subreports: ReadProperties AND ExecuteAndView|
|SharePoint Mode Required Permissions||On the main report and all subreports: <xref:Microsoft.SharePoint.SPBasePermissions.ViewListItems>|
Render2 renders a processed report associated with the report execution identified in the ExecutionInfo2 header. If no session snapshot exists, this method will execute the report (if all credential and parameter requirements are met), resulting in a new session snapshot being created. If the report needs to be reprocessed because non-query parameter values have changed, the snapshot will be reprocessed.
If the execution options are set to cache or execution snapshot, the call to Render2 may use an existing snapshot.
If the report is set to cache and the supplied parameter values and credentials match, the cached copy of the snapshot may be loaded instead of actually processing the report.
If credential and parameter requirements are not met, this method will return an error.
Subsequent calls to Render2 can be used to fetch additional pages of the report if the rendering extension supports specifying multiple pages.
A limitation of the Render method is that the output cannot be streamed, so the entire file must be in-memory.
Please see Identifying Execution State for a discussion of the execution life cycle, which includes a description of the steps necessary to load and render a report.