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
'Declaration
Public Function GetTotalPages As Integer
'Usage
Dim instance As Report
Dim returnValue As Integer
returnValue = instance.GetTotalPages
public int GetTotalPages ()
public:
int GetTotalPages ()
public int GetTotalPages ()
public function GetTotalPages () : int
Return Value
An integer value containing the total number of soft pages in the report. For more information on soft pages, see Understanding Rendering Behaviors.
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 Actual page count mode.
See Also
Reference
Report Class
Report Members
Microsoft.Reporting.WinForms Namespace