[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Viewer.Win.Viewer.Render

Render Method

Render(IRenderingExtension, StreamProvider, NameValueCollection)

Exports the specified loaded report to the specified file (or group of files) using the specified export extension.

Declaration
public void Render(IRenderingExtension extension, StreamProvider streamProvider, NameValueCollection settings)
Parameters
Type Name Description
IRenderingExtension extension

The IRenderingExtension object to use for exporting the report.

StreamProvider streamProvider

The stream provider that manages the creation of streams for the exported document. It allows for exporting to multiple streams, supporting scenarios where the export might result in multiple files (e.g., exporting to images).

NameValueCollection settings

A collection of name/value pairs that specify settings for the export operation. These settings can include parameters such as page range, resolution, and other export-specific options.

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.

Examples
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);