ReportViewer.MaximumPageCount Field

 

A constant that represents the maximum number of pages in a report when the current page count mode is Estimate.

Namespace:   Microsoft.Reporting.WinForms
Assembly:  Microsoft.ReportViewer.WinForms (in Microsoft.ReportViewer.WinForms.dll)

Syntax

public const int MaximumPageCount
public:
literal int MaximumPageCount
static val mutable MaximumPageCount : int
Public Const MaximumPageCount As Integer

Field Value

Type: System.Int32

Remarks

Use MaximumPageCount to specify the last page of a report even when you do not have the maximum page count.

To navigate to the last page of a report when the current page count mode is Estimate, set the CurrentPage property to MaximumPageCount. If you do this in Actual mode, the ReportViewer throws an InvalidOperationException.

Certain operations cause the ReportViewer control to calculate the actual total number of pages, such as exporting a report or navigating to the last page of the report. Before setting the CurrentPage property to MaximumPageCount, you should verify that the current page count is an estimated page count by using the GetTotalPages method in the LocalReport or ServerReport object.

See Also

ReportViewer Class
Microsoft.Reporting.WinForms Namespace

Return to top