Link to home
Start Free TrialLog in
Avatar of ict-torquilclark
ict-torquilclark

asked on

Best way to close a crystal reportviewer

I have a form that is compleatly filled by a crystal report viewer item.

The ShowCloseButton property is set to TRUE but when I click it nothing happens.

How can I get the report to close?
Avatar of jppinto
jppinto
Flag of Portugal image

You can use the Esc key to close the report viewer, like this:

Private Sub frmViewCrystalReports_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
       If e.KeyCode = Keys.Escape Then Me.Close()
End Sub

jppinto
Avatar of UnifiedIS
UnifiedIS

The ShowCloseButton affects the toolbar button that closes a "view" of a report which is the view that opens when you drill into a section.
You could add a control on top of the viewer control so there is a visual cue to close the screen.
ASKER CERTIFIED SOLUTION
Avatar of ict-torquilclark
ict-torquilclark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial