[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Viewer.Win.Viewer.PreviewPages

PreviewPages Property

PreviewPages

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.

Declaration
[Browsable(false)]
public int PreviewPages { get; set; }
Property Value
Type Description
int

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 SectionReport or 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.

Examples

This example shows how to set the PreviewPages property programmatically in a WinForms application that uses the Viewer control.

viewer.PreviewPages = 10;