ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / Render Method
The rendering extension to render the currently loaded report.
The stream provider to store the render output.
The rendering extension settings.
Example

In This Topic
    Render Method (Viewer)
    In This Topic
    Exports the specified loaded report to the specified file (or group of files) using the specified export extension.
    Syntax
    'Declaration
     
    Public Sub Render( _
       ByVal extension As IRenderingExtension, _
       ByVal streamProvider As StreamProvider, _
       ByVal settings As NameValueCollection _
    ) 

    Parameters

    extension
    The rendering extension to render the currently loaded report.
    streamProvider
    The stream provider to store the render output.
    settings
    The rendering extension settings.
    Remarks
    This method is intended for use with page reports only. It leverages the specified extension to render the report into the format supported by the extension, using the streams provided by the streamProvider. The settings parameter allows for detailed control over the export process, with the available options depending on the specific rendering extension used. Common settings include "StartPage", "EndPage" for specifying page ranges, and "DpiX", "DpiY" for setting the resolution of exported images.
    Example
    var pdfRenderingExtension = new PdfRenderingExtension();
    var streamProvider = new FileStreamProvider(new DirectoryInfo("path/to/your/output"), string.Empty);
    var settings = new NameValueCollection
    {
        { "Pagination", "True" }
    };
    var viewer = new Viewer();
    viewer.Render(pdfRenderingExtension, streamProvider, settings);
    See Also