共用方式為


ReportViewer.GetPageSettings 方法

傳回用來列印 ReportViewer 控制項中之目前報表的頁面設定。

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

語法

'宣告
Public Function GetPageSettings As PageSettings
'用途
Dim instance As ReportViewer
Dim returnValue As PageSettings

returnValue = instance.GetPageSettings()
public PageSettings GetPageSettings()
public:
PageSettings^ GetPageSettings()
member GetPageSettings : unit -> PageSettings 
public function GetPageSettings() : PageSettings

傳回值

型別:System.Drawing.Printing.PageSettings
PageSettings 物件,包含用來列印 ReportViewer 控制項中之目前報表的頁面設定,如果 ReportViewer 控制項尚未處理報表則為 null

備註

根據預設,當列印目前報表時,ReportViewer 控制項會使用報表定義中指定的頁面設定。透過變更所傳回 PageSettings 物件的屬性來修改頁面設定,沒有任何作用。若要修改頁面設定,您必須使用 SetPageSettings 方法。

傳回的頁面設定只適用於 ReportViewer 控制項中的目前報表,並不適用於其父報表或可從目前報表存取的鑽研報表。

若要確認報表區域是否包含報表,請使用 ReportAreaContentType 屬性。

請參閱

參考

ReportViewer 類別

Microsoft.Reporting.WebForms 命名空間

SetPageSettings

ResetPageSettings