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?
LVL 1
ict-torquilclarkAsked:
Who is Participating?
 
ict-torquilclarkConnect With a Mentor Author Commented:
For some reason - my form had the following property set - controlbox = false, this meant that the x at the top right hand corner of the screen was missing.

0
 
jppintoCommented:
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
0
 
UnifiedISCommented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.