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 值。
備註
當報表以標準模式顯示 (DisplayMode 為 Normal) 時,根據 ProcessingMode 的目前值,這個方法會傳回和 LocalReport 或 ServerReport 中的 GetTotalPages 相同的值。當報表以整頁模式顯示 (DisplayMode 為 [F:Microsoft.Reporting.WinForms.DisplayMode.PrintLayout)]) 時,這個方法會傳回目前已產生的總頁數。如果報表頁面仍在產生 (尚未觸發 RenderingComplete 事件),這個值會隨著產生更多頁面而更新。