PrintOptions.CopyFrom Method
Copies the values of PrinterSettings and PageSettings into this PrintOptions.
Namespace CrystalDecisions.CrystalReports.Engine Assembly CrystalDecisions.CrystalReports.Engine (CrystalDecisions.CrystalReports.Engine.dll)
Syntax
'Declaration
Public Overrideable Sub CopyFrom ( _
ByVal printer As System.Drawing.Printing.PrinterSettings, _
ByVal page As System.Drawing.Printing.PageSettings _
)
public virtual void CopyFrom (
System.Drawing.Printing.PrinterSettings printer,
System.Drawing.Printing.PageSettings page
)
Parameters
- printer
The PrinterSettings to use.
- page
The PageSettings to use.
Remarks
If the PaperSource property of the PageSettings is Custom, then the PaperSource of this PrintOptions will be set to Auto.
Example
This example copies the print options from the current printer settings to the specified report.
'Declaration
Private Sub CopyPrintOptions(ByVal myReportDocument As ReportDocument, _
ByVal printerSettings As System.Drawing.Printing.PrinterSettings, _
ByVal pageSettings As System.Drawing.Printing.PageSettings)
myReportDocument.PrintOptions.CopyFrom(printerSettings, pageSettings)
End Sub
private void CopyPrintOptions(ReportDocument reportDocument,
System.Drawing.Printing.PrinterSettings printerSettings,
System.Drawing.Printing.PageSettings pageSettings)
{
reportDocument.PrintOptions.CopyFrom(printerSettings, 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