Share via


ReportViewer.GetTotalPages 方法

返回报表中的总页数。

命名空间:  Microsoft.Reporting.WinForms
程序集:  Microsoft.ReportViewer.WinForms(在 Microsoft.ReportViewer.WinForms.dll 中)

语法

声明
Public Function GetTotalPages As Integer
用法
Dim instance As ReportViewer
Dim returnValue As Integer

returnValue = instance.GetTotalPages()
public int GetTotalPages()
public:
int GetTotalPages()
member GetTotalPages : unit -> int 
public function GetTotalPages() : int

返回值

类型:System.Int32
一个 integer 值,其中包含报表中的总页数。

注释

当报表在正常模式下显示时(DisplayModeNormal),此方法返回与 LocalReportServerReport 中的 GetTotalPages 相同的值,具体取决于 ProcessingMode 的当前值。当报表在打印布局模式下显示时(DisplayMode 为 [F:Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)]),此方法返回当前已生成的页面总数。如果报表页仍在生成(尚未触发 RenderingComplete 事件),则生成更多页时此值将更新。

请参阅

参考

ReportViewer 类

GetTotalPages 重载

Microsoft.Reporting.WinForms 命名空间