本文為機器翻譯文章。如需檢視英文版,請選取 [原文] 核取方塊。您也可以將滑鼠指標移到文字上,即可在快顯視窗顯示英文原文。
譯文
原文

LocalReport.GetDefaultPageSettings 方法 ()

 

取得本機報表所指定的預設頁面設定。

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

public override ReportPageSettings GetDefaultPageSettings()

傳回值

Type: Microsoft.Reporting.WebForms.ReportPageSettings

ReportPageSettings 物件,包含本機報表的預設頁面設定。

The returned ReportPageSettings object can be used to pass page margin and page size information through a deviceInfo argument that is passed to the M:Microsoft.Reporting.WebForms.LocalReport.Render(System.String,System.String,System.String@,System.String@,System.String@,System.String[]@,Microsoft.Reporting.WebForms.Warning[]@) method.

Private Sub Button2_Click(ByVal sender As System.Object, _
   ByVal e As System.EventArgs) Handles Button2.Click
   Dim pageSettings As ReportPageSettings

   pageSettings = ReportViewer1.LocalReport.GetDefaultPageSettings

   Debug.WriteLine(pageSettings.Margins.Top)
   Debug.WriteLine(pageSettings.Margins.Bottom)
   Debug.WriteLine(pageSettings.Margins.Left)
   Debug.WriteLine(pageSettings.Margins.Right)
   Debug.WriteLine(pageSettings.PaperSize.Kind)
   Debug.WriteLine(pageSettings.PaperSize.RawKind)
   Debug.WriteLine(pageSettings.PaperSize.PaperName)
   Debug.WriteLine(pageSettings.PaperSize.Height)
   Debug.WriteLine(pageSettings.PaperSize.Width)

End Sub
   Debug.WriteLine(pageSettings.Margins.Top)
   Debug.WriteLine(pageSettings.Margins.Bottom)
   Debug.WriteLine(pageSettings.Margins.Left)
   Debug.WriteLine(pageSettings.Margins.Right)
   Debug.WriteLine(pageSettings.PaperSize.Kind)
   Debug.WriteLine(pageSettings.PaperSize.RawKind)
   Debug.WriteLine(pageSettings.PaperSize.PaperName)
   Debug.WriteLine(pageSettings.PaperSize.Height)
   Debug.WriteLine(pageSettings.PaperSize.Width)

End Sub
回到頁首
顯示: