Partilhar via


Método ServerReport.GetDefaultPageSettings

Gets the default page settings specified in the report definition.

Namespace:  Microsoft.Reporting.WinForms
Assembly:  Microsoft.ReportViewer.WinForms (em Microsoft.ReportViewer.WinForms.dll)

Sintaxe

'Declaração
Public Overrides Function GetDefaultPageSettings As ReportPageSettings
public override ReportPageSettings GetDefaultPageSettings()
public:
virtual ReportPageSettings^ GetDefaultPageSettings() override
abstract GetDefaultPageSettings : unit -> ReportPageSettings 
override GetDefaultPageSettings : unit -> ReportPageSettings 
public override function GetDefaultPageSettings() : ReportPageSettings

Valor de retorno

Tipo: Microsoft.Reporting.WinForms.ReportPageSettings
A ReportPageSettings object containing the default page settings for the local report.

Comentários

The ReportPageSettings object that is returned can be used to pass page margin and page size information via the deviceInfo argument passed to the Render method.

Exemplos

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

   pageSettings = ReportViewer1.ServerReport.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

Consulte também

Referência

ServerReport Classe

Namespace Microsoft.Reporting.WinForms