[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Blazor.Designer.PreviewSettings

PreviewSettings Class

Represents settings related to the document preview functionality, allowing configuration of the preview button visibility and integration of a viewer component.

Inheritance
PreviewSettings
Namespace: GrapeCity.ActiveReports.Blazor.Designer
Assembly: MESCIUS.ActiveReports.Blazor.Designer.dll
Syntax
public class PreviewSettings
Examples
private PreviewSettings _preview;
public Index()
{
    _preview = new PreviewSettings()
    {
        CanPreview = true,
        OpenViewer = OpenViewer
    };
}

private async void OpenViewer(ViewerSettings settings)
{
    if (_viewer != null)
    {
	    await _viewer.OpenReport(settings.DocumentInfo.Id);
	    return;
    }
    _viewer = new ReportViewer();
    var initOptions = new InitializationOptions();
    initOptions.ReportID = settings.DocumentInfo.Id;
    await _viewer.Render(JSRuntime, settings.Element, initOptions);
}

Constructors

Name Description
PreviewSettings()

Properties

Name Description
CanPreview

Gets or sets a value indicating whether the Preview button should be shown.

OpenViewer

Gets or sets a function to plug in a viewer component, which will be called when the preview is opened.