Occasionally my report generates an exception which I wish to catch and handle in my web page.
I had a look at the post : http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-handle-errors-exceptions.aspx
which provides a nice piece of c# code.
I have translated this to VB to get this :
AddHandler _rptBody.[Error], Sub(innerSender As Object, eventArgs As ErrorEventArgs)
Me.ReportViewer.Report = Nothing
Me.Label1.Text = eventArgs.Exception.Message.ToString()
End Sub
But sadly Visual Studio informs me that :
Error is not an event of object.
I have to say that c# is my language and not VB but sadly I have to do this in VB.
Am I doing something wrong here?
I had a look at the post : http://www.telerik.com/community/forums/reporting/telerik-reporting/how-to-handle-errors-exceptions.aspx
which provides a nice piece of c# code.
I have translated this to VB to get this :
AddHandler _rptBody.[Error], Sub(innerSender As Object, eventArgs As ErrorEventArgs)
Me.ReportViewer.Report = Nothing
Me.Label1.Text = eventArgs.Exception.Message.ToString()
End Sub
But sadly Visual Studio informs me that :
Error is not an event of object.
I have to say that c# is my language and not VB but sadly I have to do this in VB.
Am I doing something wrong here?