VSView Reporting Edition Reference > VSReport Control > VSReport Properties > OnError Property |
Returns or sets the VBScript handler for the OnError event.
[form!]VSReport.OnError[ = value As String ]
This property contains a string with a VBScript that gets executed when an error occurs while the control is rendering a report. The control also fires the OnError event at this time.
The difference between the regular event and the VBScript property is that the handler for the regular event belongs to the application, and should thus be used to support tasks that are independent of the report. For example, to show an application dialog box when an error occurs.
The VBScript handler in the property belongs to the report, and will be executed regardless of the application. For example, a particular report might contain a VBScript handler that changes the value of a field when an error occurs.
String