ReportDocument.PrintOptions Property

Gets the PrintOptions object.

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

Syntax

'Declaration

Public Overrideable ReadOnly Property PrintOptions As CrystalDecisions.CrystalReports.Engine.PrintOptions
public virtual CrystalDecisions.CrystalReports.Engine.PrintOptions PrintOptions {get;}

Example

This example sets the page margins in the print options of a report.

'Declaration

      Private Sub SetMargins(ByVal myReportDocument As ReportDocument, ByVal left As Integer, ByVal top As Integer, ByVal right As Integer, ByVal bottom As Integer)
         Dim myPageMargins As PageMargins
         myPageMargins = myReportDocument.PrintOptions.PageMargins
         myPageMargins.leftMargin = left
         myPageMargins.topMargin = top
         myPageMargins.rightMargin = right
         myPageMargins.bottomMargin = bottom

         myReportDocument.PrintOptions.ApplyPageMargins(myPageMargins)
      End Sub
      
      private void SetMargins(ReportDocument reportDocument, int left, int top, int right, int bottom)
      {
         PageMargins pageMargins = reportDocument.PrintOptions.PageMargins;
         pageMargins.leftMargin = left;
         pageMargins.topMargin = top;
         pageMargins.rightMargin = right;
         pageMargins.bottomMargin = bottom;

         reportDocument.PrintOptions.ApplyPageMargins(pageMargins);
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

ReportDocument Class
ReportDocument Members
CrystalDecisions.CrystalReports.Engine Namespace