Condividi tramite


Metodo LocalReport.GetDefaultPageSettings

Recupera le impostazioni di pagina predefinite specificate nel report locale.

Spazio dei nomi:  Microsoft.Reporting.WebForms
Assembly:  Microsoft.ReportViewer.WebForms (in Microsoft.ReportViewer.WebForms.dll)

Sintassi

'Dichiarazione
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

Valore restituito

Tipo: Microsoft.Reporting.WebForms.ReportPageSettings
Oggetto ReportPageSettings contenente le impostazioni di pagina predefinite per il report locale.

Note

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

Esempi

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

Vedere anche

Riferimenti

LocalReport Classe

Spazio dei nomi Microsoft.Reporting.WebForms