Partager via


PrintOptions.ApplyPageMargins Méthode

Applique les paramètres de marges de page au rapport.

[Visual Basic]

Public Overrideable Sub ApplyPageMargins( _
   ByVal value As CrystalDecisions.Shared.PageMargins _
)

[C#]

public virtual void ApplyPageMargins(
   CrystalDecisions.Shared.PageMargins value
);

Paramètres

  • value
    Contient les paramètres de marges de page du rapport.

Exemple

[VJ#]

      private void printReport(String printerName)
      {
         PageMargins margins;
      
         margins = Report.get_PrintOptions().get_PageMargins();
         margins.bottomMargin = 350;
         margins.leftMargin = 350;
         margins.rightMargin = 350;
         margins.topMargin = 350;
         Report.get_PrintOptions().ApplyPageMargins(margins);
      
         Report.get_PrintOptions().set_PrinterName(printerName);
      
         Report.PrintToPrinter(1, false,0,0);
      }
      
[Visual Basic]

      Private Sub PrintReport(ByVal printerName As String)
         Dim margins As PageMargins
      
         margins = Report.PrintOptions.PageMargins
         margins.bottomMargin = 350
         margins.leftMargin = 350
         margins.rightMargin = 350
         margins.topMargin = 350
         Report.PrintOptions.ApplyPageMargins(margins)
      
         Report.PrintOptions.PrinterName = printerName
         
         Report.PrintToPrinter(1, False, 0, 0)
      End Sub
      
[C++]

      void PrintReport(String* printerName)
      {
         PageMargins margins;
      
         margins = Report->PrintOptions->PageMargins;
         margins.bottomMargin = 350;
         margins.leftMargin = 350;
         margins.rightMargin = 350;
         margins.topMargin = 350;
         Report->PrintOptions->ApplyPageMargins(margins);
      
         Report->PrintOptions->PrinterName = printerName;
      
         Report->PrintToPrinter(1, false,0,0);
      };
      
[C#]

      private void PrintReport(string printerName)
      {
         PageMargins margins;
      
         margins = Report.PrintOptions.PageMargins;
         margins.bottomMargin = 350;
         margins.leftMargin = 350;
         margins.rightMargin = 350;
         margins.topMargin = 350;
         Report.PrintOptions.ApplyPageMargins(margins);
      
         Report.PrintOptions.PrinterName = printerName;
      
         Report.PrintToPrinter(1, false,0,0);
      }
      

Configuration requise

Espace de noms CrystalDecisions.CrystalReports.Engine

Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)

Voir aussi

PrintOptions Classe | PrintOptions Membres | CrystalDecisions.CrystalReports.Engine Espace de noms

**

©2005 Business Objects SA. Tous droits réservés.

Business Objects SA.
http://www.france.businessobjects.com/
Services de support
http://www.businessobjects.com/support/