Share via


ReportViewer.PrintingBegin 事件

当用户单击**“打印”对话框中的“打印”**按钮时发生。

命名空间:  Microsoft.Reporting.WinForms
程序集:  Microsoft.ReportViewer.WinForms(在 Microsoft.ReportViewer.WinForms.dll 中)

语法

声明
Public Event PrintingBegin As ReportPrintEventHandler
用法
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);
}
member PrintingBegin : IEvent<ReportPrintEventHandler,
    ReportPrintEventArgs>
JScript 支持使用事件,但不支持声明新事件。

注释

当由 PrintDialog 方法或通过用户单击工具栏中的**“打印”按钮启动“打印”**对话框时,发生此事件。有关此事件的信息通过 ReportPrintEventArgs 对象传递到处理此事件的 ReportPrintEventHandler 委托。

事件参数包含用户在**“打印”对话框中选择的打印机设置。如果未取消此事件,则打印机设置会保存到 PrinterSettings 属性中。如果取消此事件,则不显示“打印”**对话框,不打印报表,并且不保存打印机设置。

有关处理事件的更多信息,请参见Consuming Events

请参阅

参考

ReportViewer 类

Microsoft.Reporting.WinForms 命名空间