ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Viewer.Win Assembly / GrapeCity.ActiveReports.Viewer.Win Namespace / Viewer Class / PreviewPages Property
Example

In This Topic
    PreviewPages Property (Viewer)
    In This Topic
    Gets or sets the number of pages to preview when loading a report. Setting this property to a value less than or equal to 0 will result in all pages being loaded and available for preview.
    Syntax
    'Declaration
     
    Public Property PreviewPages As Integer
    public int PreviewPages {get; set;}

    Property Value

    The number of pages to preview. A value less than or equal to 0 indicates that all pages of the report should be loaded and available for preview.
    Remarks
    This property is particularly useful for improving the performance of report loading and rendering in scenarios where only a subset of the report's pages needs to be previewed initially. It is applicable when loading reports from instances of GrapeCity.ActiveReports.SectionReport or GrapeCity.ActiveReports.Document.PageDocument. When a report is loaded with a specific number of preview pages set, only those pages will be available for preview in the viewer. This can significantly reduce the time and resources required to load and display large reports.
    Example
    This example shows how to set the PreviewPages property programmatically in a WinForms application that uses the Viewer control.
    viewer.PreviewPages = 10;
    See Also