ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Blazor.Designer Assembly / GrapeCity.ActiveReports.Blazor.Designer Namespace / PreviewSettings Class
Members Example

In This Topic
    PreviewSettings Class
    In This Topic
    Represents settings related to the document preview functionality, allowing configuration of the preview button visibility and integration of a viewer component.
    Object Model
    PreviewSettings Class
    Syntax
    'Declaration
     
    Public Class PreviewSettings 
    public class PreviewSettings 
    Example
    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);
    }
    Inheritance Hierarchy

    System.Object
       GrapeCity.ActiveReports.Blazor.Designer.PreviewSettings

    See Also