See Also

ActiveReport Class  | ActiveReport Members

Language

Visual Basic

C#

Show All

See Also Languages ActiveReports Send feedback to Data Dynamics

ExpressionErrorMessage Property

Stops the reporting engine from throwing exceptions and instead displays the provided string.

[Visual Basic]
Public Property ExpressionErrorMessage As String
[C#]
public string ExpressionErrorMessage {get; set;}

Return Type

String. The default value is null.

Remarks

If this property is not set and an expression can't be parsed, or if you get a divide-by-zero type exception, ActiveReports will throw a ReportScriptException and stop the report from running.

When this property is set to a valid string, the engine stops throwing exceptions and instead displays the specified string (like Excel). Set it to ### and try Sales/0 to test.

Persistence: There is a new attribute called "ExprError" in .rpx files.

Example

[C#] 

private void arv_Load(object sender, System.EventArgs e) 

    rptDataDynamics rpt = new rptDataDynamics(); 
    rpt.ExpressionErrorMessage = "oops"; 
    rpt.Run(); 
    this.arv.Document = rpt.Document; 
}

[Visual Basic] 

Private Sub Viewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Viewer1.Load
    Dim rpt As New rptDD
    rpt.ExpressionErrorMessage = "oops"
    rpt.Run()
    Me.Viewer1.Document = rpt.Document
End Sub

See Also

ActiveReport Class  | ActiveReport Members

 

 


Copyright © 2004-2005 Data Dynamics, Ltd. All rights reserved.