ReportViewer.GetPageSettings 方法 ()

 

發佈時間: 2016年4月

傳回用來列印 ReportViewer 控制項中之目前報表或以整頁模式顯示此報表的頁面設定。

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

語法

public PageSettings GetPageSettings()
public:
PageSettings^ GetPageSettings()
member GetPageSettings : unit -> PageSettings
Public Function GetPageSettings As PageSettings

傳回值

Type: System.Drawing.Printing.PageSettings

PageSettings 物件,包含用來列印 ReportViewer 控制項中之目前報表或以整頁模式顯示此報表的頁面設定,如果 ReportViewer 控制項尚未處理報表則為 null

備註

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

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

請參閱

SetPageSettings
ResetPageSettings
ReportViewer 類別
Microsoft.Reporting.WinForms 命名空間

回到頁首