Report.GetTotalPages 方法 ()

 

傳回報表中的軟分頁總數。

命名空間:   Microsoft.Reporting.WinForms
組件:  Microsoft.ReportViewer.WinForms (在 Microsoft.ReportViewer.WinForms.dll 中)

語法

public int GetTotalPages()
public:
int GetTotalPages()
member GetTotalPages : unit -> int
Public Function GetTotalPages As Integer

傳回值

Type: System.Int32

包含報表中軟分頁總數的 integer 值。如需軟分頁的詳細資訊,請參閱Understanding Rendering Behaviors。

備註

用來產生總頁數的頁面計數模式取決於 Report 物件轉譯報表的方式。如果報表是使用 Actual 模式轉譯,GetTotalPages 會使用 Actual 頁面計數模式。如果報表是使用 Estimate 模式轉譯,GetTotalPages 會根據報表,使用 ActualEstimate 模式。根據預設,Estimate 模式會用來計算頁數。如需詳細資訊,請參閱 Render 類別和 PageCountMode 方法。

若要擷取用來計算總頁數的頁面計數模式,請使用 GetTotalPages

ReportViewer 控制項為整頁模式時,這個方法永遠會使用 T:Microsoft.Reporting.WinForms.PageCountMode.Actual page count mode。

請參閱

GetTotalPages 超載
Report 類別
Microsoft.Reporting.WinForms 命名空間

回到頁首