Share via


PrintOptions.CopyTo Method

Copies the values of this PrintOptions into PrinterSettings and PageSettings.

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

Syntax

'Declaration
Public Overrideable Sub CopyTo ( _
    ByVal printer As System.Drawing.Printing.PrinterSettings, _ 
    ByVal page As System.Drawing.Printing.PageSettings _    
) 
public virtual void CopyTo (
    System.Drawing.Printing.PrinterSettings printer,
    System.Drawing.Printing.PageSettings page
)

Parameters

  • printer
    The PrinterSettings to use.
  • page
    The PageSettings to use.

Example

This example copies the print options from the current report to the system settings.

'Declaration

      Private Sub CopyPrintOptionsFromSystemSettings(ByVal myReportDocument As ReportDocument, _
        ByVal printSettings As System.Drawing.Printing.PrinterSettings, _
        ByVal pageSettings As System.Drawing.Printing.PageSettings)
         Dim myNewPrintOptions As PrintOptions = myReportDocument.PrintOptions()
         myNewPrintOptions.CopyTo(printSettings, pageSettings)
      End Sub
      
      private void CopyPrintOptionsFromSystemSettings(ReportDocument reportDocument,
        System.Drawing.Printing.PrinterSettings printSettings,
        System.Drawing.Printing.PageSettings pageSettings)
      {
        PrintOptions newPrintOptions = reportDocument.PrintOptions;
        newPrintOptions.CopyTo(printSettings, pageSettings);
      }

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports .NET 10

See Also

Reference

PrintOptions Class
PrintOptions Members
CrystalDecisions.CrystalReports.Engine Namespace