LocalReport.GetTotalPages 方法
Returns the total number of logical pages in the report.
命名空間: Microsoft.Reporting.WinForms
組件: Microsoft.ReportViewer.WinForms (在 microsoft.reportviewer.winforms.dll)
語法
傳回值
An integer value that contains the total number of logical pages in the report.
備註
GetTotalPages should be called only after rendering of the local report is complete. You can use the RenderingComplete event of the control to determine when report rendering finishes.
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.
範例
private void button1_Click(object sender, EventArgs e)
{
int iTotalPages = this.reportViewer1.LocalReport.GetTotalPages();
}
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
iTotalPages = ReportViewer1.LocalReport.GetTotalPages
End Sub
另請參閱
參考
LocalReport 類別
LocalReport 成員
Microsoft.Reporting.WinForms 命名空間