Vb.net 如何检测何时触发水晶报表打印按钮?
如何访问Crystal Report中的Vb.net 如何检测何时触发水晶报表打印按钮?,vb.net,crystal-reports,Vb.net,Crystal Reports,如何访问Crystal Report中的打印控制按钮并在其上放置事件。我使用的是VB.NETVisualStudio2010 WinForm 我不确定您是否有权在Crystal Reports版本中访问此功能,但在v7中,您可以引用Crystal Report Engine Automation服务器,从该服务器可以创建窗口对象(报表的预览屏幕),通过定义此WithEvent可以截取预览窗口事件 Private oCrystal As New CRPEAuto.Application Pr
打印
控制按钮并在其上放置事件
。我使用的是VB.NET
VisualStudio2010 WinForm 我不确定您是否有权在Crystal Reports版本中访问此功能,但在v7中,您可以引用Crystal Report Engine Automation服务器,从该服务器可以创建窗口对象(报表的预览屏幕),通过定义此WithEvent可以截取预览窗口事件
Private oCrystal As New CRPEAuto.Application
Private oReport As CRPEAuto.Report
Private WithEvents oWindow As CRPEAuto.Window
Private Sub Command1_Click()
Set oReport = oCrystal.OpenReport("C:\Report1.rpt")
Set oWindow = oReport.Preview("Report Title").Parent
End Sub
Private Sub oWindow_PrintButtonClicked(UseDefault As Boolean)
MsgBox "Print Clicked"
End Sub