Compartir a través de


Render2 Método

Processes a specific report and renders it in the specified format.

Espacio de nombres:  ReportExecution2005
Ensamblado:  ReportExecution2005 (en ReportExecution2005.dll)

Sintaxis

'Declaración
<SoapHeaderAttribute("ServerInfoHeaderValue", Direction := SoapHeaderDirection.Out)> _
<SoapHeaderAttribute("ExecutionHeaderValue")> _
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/Render2", RequestNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    ResponseNamespace := "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
<SoapHeaderAttribute("TrustedUserHeaderValue")> _
Public Function Render2 ( _
    Format As String, _
    DeviceInfo As String, _
    PaginationMode As PageCountMode, _
    <OutAttribute> ByRef Extension As String, _
    <OutAttribute> ByRef MimeType As String, _
    <OutAttribute> ByRef Encoding As String, _
    <OutAttribute> ByRef Warnings As Warning(), _
    <OutAttribute> ByRef StreamIds As String() _
) As Byte()
'Uso
Dim instance As ReportExecutionService
Dim Format As String
Dim DeviceInfo As String
Dim PaginationMode As PageCountMode
Dim Extension As String
Dim MimeType As String
Dim Encoding As String
Dim Warnings As Warning()
Dim StreamIds As String()
Dim returnValue As Byte()

returnValue = instance.Render2(Format, _
    DeviceInfo, PaginationMode, Extension, _
    MimeType, Encoding, Warnings, StreamIds)
[SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)]
[SoapHeaderAttribute("ExecutionHeaderValue")]
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/Render2", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
[SoapHeaderAttribute("TrustedUserHeaderValue")]
public byte[] Render2(
    string Format,
    string DeviceInfo,
    PageCountMode PaginationMode,
    out string Extension,
    out string MimeType,
    out string Encoding,
    out Warning[] Warnings,
    out string[] StreamIds
)
[SoapHeaderAttribute(L"ServerInfoHeaderValue", Direction = SoapHeaderDirection::Out)]
[SoapHeaderAttribute(L"ExecutionHeaderValue")]
[SoapDocumentMethodAttribute(L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/Render2", RequestNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = L"https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse::Literal, ParameterStyle = SoapParameterStyle::Wrapped)]
[SoapHeaderAttribute(L"TrustedUserHeaderValue")]
public:
array<unsigned char>^ Render2(
    String^ Format, 
    String^ DeviceInfo, 
    PageCountMode PaginationMode, 
    [OutAttribute] String^% Extension, 
    [OutAttribute] String^% MimeType, 
    [OutAttribute] String^% Encoding, 
    [OutAttribute] array<Warning^>^% Warnings, 
    [OutAttribute] array<String^>^% StreamIds
)
[<SoapHeaderAttribute("ServerInfoHeaderValue", Direction = SoapHeaderDirection.Out)>]
[<SoapHeaderAttribute("ExecutionHeaderValue")>]
[<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/Render2", RequestNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    ResponseNamespace = "https://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)>]
[<SoapHeaderAttribute("TrustedUserHeaderValue")>]
member Render2 : 
        Format:string * 
        DeviceInfo:string * 
        PaginationMode:PageCountMode * 
        Extension:string byref * 
        MimeType:string byref * 
        Encoding:string byref * 
        Warnings:Warning[] byref * 
        StreamIds:string[] byref -> byte[] 
public function Render2(
    Format : String, 
    DeviceInfo : String, 
    PaginationMode : PageCountMode, 
    Extension : String, 
    MimeType : String, 
    Encoding : String, 
    Warnings : Warning[], 
    StreamIds : String[]
) : byte[]

Parámetros

  • Format
    Tipo: System. . :: . .String
    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.
  • DeviceInfo
    Tipo: System. . :: . .String
    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 fe718939-7efe-4c7f-87cb-5f5b09caeff4 Device Information Settings .
  • Encoding
    Tipo: System. . :: . .String%
    [out] The encoding used when report server renders the contents of the report.
  • StreamIds
    Tipo: array<System. . :: . .String> [] () [] []%
    [out] The stream identifiers. These IDs are passed to the RenderStream method. You can use them to render the external resources (images, etc.) that are associated with a given report.

Valor devuelto

Tipo: array<System. . :: . .Byte> [] () [] []
A Byte[] array of the report in the specified format.

Notas

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 Identificar el estado de ejecución for a discussion of the execution life cycle, which includes a description of the steps necessary to load and render a report.