Udostępnij za pośrednictwem


ServerReport.GetTotalPages Method

Retrieves the total number of logical pages for the server report.

Namespace: Microsoft.Reporting.WebForms
Assembly: Microsoft.ReportViewer.WebForms (in microsoft.reportviewer.webforms.dll)

Syntax

'Declaration
Public Overrides Function GetTotalPages As Integer
'Usage
Dim instance As ServerReport
Dim returnValue As Integer

returnValue = instance.GetTotalPages
public override int GetTotalPages ()
public:
virtual int GetTotalPages () override
public int GetTotalPages ()
public override function GetTotalPages () : int

Return Value

An integer value containing the total number of logical pages in the report.

Remarks

Because this method returns the number of logical pages in the report, the value returned may not match the number of physical pages in the report.

Example

private void button1_Click(object sender, EventArgs e)
{
   int iTotalPages = this.reportViewer1.ServerReport.GetTotalPages();
}
Private Sub Button1_Click(ByVal sender As System.Object, _
   ByVal e As System.EventArgs) Handles Button1.Click
    Dim iTotalPages as Integer
    iTotalPages = ReportViewer1.ServerReport.GetTotalPages
End Sub

See Also

Reference

ServerReport Class
ServerReport Members
Microsoft.Reporting.WebForms Namespace