次の方法で共有


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 名前空間