Click to See Complete Forum and Search --> : Print Button In Crystal Report
pavinda
Nov 14th, 1999, 04:10 AM
How do I Know When user click Print button on report screen.(What Event trigger when The print button was click.
Aaron Young
Nov 14th, 1999, 06:10 AM
I'm not sure if you have access to this in your Version of Crystal Reports, but in v7 you can reference the Crystal Report Engine Automation Server from which you can create a Window Object, (The Preview Screen for the Report), defining this WithEvent allows you to intercept the Preview Window Events..
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
You can also cancel the Default Action of the Event by setting UseDefault to False.
------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net
pavinda
Nov 15th, 1999, 02:14 AM
Thank you so much Aaron Yong. I'll try.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.