ReportViewer.PrintDialog Method (PrinterSettings)
Displays the Print dialog box.
Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in Microsoft.ReportViewer.WinForms.dll)
Syntax
public DialogResult PrintDialog(
PrinterSettings printerSettings
)
public:
DialogResult PrintDialog(
PrinterSettings^ printerSettings
)
member PrintDialog :
printerSettings:PrinterSettings -> DialogResult
Public Function PrintDialog (
printerSettings As PrinterSettings
) As DialogResult
Parameters
printerSettings
Type: System.Drawing.Printing.PrinterSettingsA PrinterSettings object, used to initialize the dialog box.
Unlike in the PrinterSettings property, this object's page ranged properties, such as the PrintRange, T:System.Drawing.Printing.FromPage, and T:System.Drawing.Printing.ToPage properties, are used by the ReportViewer to initialize the print range in the Print dialog box.
Return Value
Type: System.Windows.Forms.DialogResult
Cancel if the user clicked the Cancel button or if the Print event is cancelled; OK if the user clicked the OK button.
Remarks
Invoking this method is similar to the user clicking the Print button, except it does not trigger the Print event. If the user clicks the Print button in the Print dialog box, this method triggers the PrintingBegin event.
See Also
PrintDialog Overload
ReportViewer Class
Microsoft.Reporting.WinForms Namespace
Return to top