Share via


ReportViewer.PrintingBegin Event

Occurs when the user clicks the Print button in the Print dialog box.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

Syntax

'Declaration
Public Event PrintingBegin As ReportPrintEventHandler
'Usage
Dim instance As ReportViewer
Dim handler As ReportPrintEventHandler

AddHandler instance.PrintingBegin, handler
public event ReportPrintEventHandler PrintingBegin
public:
event ReportPrintEventHandler^ PrintingBegin {
    void add (ReportPrintEventHandler^ value);
    void remove (ReportPrintEventHandler^ value);
}
/** @event */
public void add_PrintingBegin (ReportPrintEventHandler value)

/** @event */
public void remove_PrintingBegin (ReportPrintEventHandler value)
JScript supports the use of events, but not the declaration of new ones.

Remarks

This event can occur when the Print dialog box is launched by the PrintDialog method or by the user clicking the Print button in the toolbar. Information about this event is passed in a ReportPrintEventArgs object to the ReportPrintEventHandler delegate, which handles the event.

The event arguments contain the printer settings the user selects in the Print dialog box. If this event is not cancelled, the printer settings are saved into the PrinterSettings property. If this event is cancelled, the Printing dialog box is not displayed, the report is not printed, and the printer settings are not saved.

For more information about handling events, see Consuming Events.

See Also

Reference

ReportViewer Class
ReportViewer Members
Microsoft.Reporting.WinForms Namespace