Поделиться через


LocalReport.Render Method (String, String, PageCountMode, CreateStreamCallback, out Warning )

Processes the report with a specified page count mode and renders it in the specified format using a stream provided by a callback function.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

Syntax

'Declaration
Public Sub Render ( _
    format As String, _
    deviceInfo As String, _
    pageCountMode As PageCountMode, _
    createStream As CreateStreamCallback, _
    <OutAttribute> ByRef warnings As Warning() _
)
'Usage
Dim instance As LocalReport
Dim format As String
Dim deviceInfo As String
Dim pageCountMode As PageCountMode
Dim createStream As CreateStreamCallback
Dim warnings As Warning()

instance.Render(format, deviceInfo, pageCountMode, createStream, warnings)
public void Render (
    string format,
    string deviceInfo,
    PageCountMode pageCountMode,
    CreateStreamCallback createStream,
    out Warning[] warnings
)
public:
void Render (
    String^ format, 
    String^ deviceInfo, 
    PageCountMode pageCountMode, 
    CreateStreamCallback^ createStream, 
    [OutAttribute] array<Warning^>^% warnings
)
public void Render (
    String format, 
    String deviceInfo, 
    PageCountMode pageCountMode, 
    CreateStreamCallback createStream, 
    /** @attribute OutAttribute() */ /** @ref */ Warning[] warnings
)
JScript does not support passing value-type arguments by reference.

Parameters

  • format
    The format in which to render the report. This argument maps to a rendering extension. Supported formats include Excel, PDF, Word, and Image.

    To access the list of available rendering extensions, use the ListRenderingExtensions method.

  • deviceInfo
    An XML string that contains the device-specific content that is required by the rendering extension specified in the format parameter. For more information about device information settings for specific output formats, see Device Information Settings in SQL Server Books Online.
  • pageCountMode
    A PageCountMode enumeration value that specifies the page count mode.
  • warnings
    [out] An array of Warning objects that describes any warnings that occurred during report processing and rendering.

Remarks

This method accepts a CreateStreamCallback delegate function in the createStream parameter to support custom handling of secondary streams. This method is useful for printing.

After this method completes successfully, the value of pageCountMode will be the default page count mode the LocalReport object uses when you call the GetTotalPages method. For more information, see GetTotalPages.

See Also

Reference

LocalReport Class
LocalReport Members
Microsoft.Reporting.WinForms Namespace