Share via


CrystalReportViewer.HandleException Event

Event fires when an exception occurs in the CrystalReportViewer control.

Namespace CrystalDecisions.Windows.Forms Assembly CrystalDecisions.Windows.Forms (CrystalDecisions.Windows.Forms.dll)

Syntax

'Declaration

Public Event HandleException As CrystalDecisions.Windows.Forms.ExceptionEventHandler
public event CrystalDecisions.Windows.Forms.ExceptionEventHandler HandleException

Event Data

The event handler receives an argument of type ExceptionEventArgs containing data related to this event. The following ExceptionEventArgs properties provide information specific to this event.

Property Description
Exception Gets exception data.
Handled Gets or sets whether the event was handled. Set to true if you do not want the default action to occur.
UserData Gets or sets any type of data that can be used to override what is done when an exception is handled

Remarks

This event will be raised when an exception occurs in the CrystalReportViewer control.

Example

This example sets a label to the name of an exception when an exception is thrown.

'Declaration

      Private Sub MyCrystalReportViewer_HandleException(ByVal source As _
         Object, ByVal e As CrystalDecisions.Windows.Forms.ExceptionEventArgs) _
         Handles CrystalReportViewer.HandleException
      
         Label.Text = e.Exception.ToString();
      
      End Sub
      
      private void crystalReportViewer_HandleException (object source, CrystalDecisions.Windows.Forms.ExceptionEventArgs e)
      {
         Label.Text = e.Exception.ToString();
      }
      

Version Information

Crystal Reports Basic for Visual Studio 2008

Supported since: Crystal Reports for Visual Studio .NET 2002

See Also

Reference

CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Windows.Forms Namespace