Report.GetTotalPages Method ()

 

Returns the total number of soft pages in the report.

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

Syntax

public int GetTotalPages()
public:
int GetTotalPages()
member GetTotalPages : unit -> int
Public Function GetTotalPages As Integer

Return Value

Type: System.Int32

An integer value containing the total number of soft pages in the report. For more information on soft pages, see . d57866f5-d876-41ce-bc49-0e72486a9617

Remarks

The page count mode that is used to generate the total number of pages depends on how the report is rendered by the Report object. If the report is rendered using the Actual mode, GetTotalPages uses the Actual page count mode. If the report is rendered using the Estimate mode, GetTotalPages may use either the Actual or Estimate mode depending on the report. By default, the Estimate mode is used to calculate the page count. For more information, see the PageCountMode class and the Render method.

To retrieve the page count mode used to calculate the total number of pages, use GetTotalPages.

When the ReportViewer control is in print layout mode, this method always uses the T:Microsoft.Reporting.WinForms.PageCountMode.Actual page count mode.

See Also

GetTotalPages Overload
Report Class
Microsoft.Reporting.WinForms Namespace

Return to top