ActiveReports 9
ExpressionErrorMessage Property
Example 

Stops the reporting engine from throwing exceptions and instead displays the provided string.
Syntax
'Declaration
 
Public Property ExpressionErrorMessage As System.String
public System.string ExpressionErrorMessage {get; set;}

Property Value

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
private void arViewer_Load(object sender, System.EventArgs e)
{
    SectionReport1 rpt = new SectionReport1();
    rpt.ExpressionErrorMessage = "oops";
    rpt.Run();
    this.arViewer.Document = rpt.Document;
}
Private Sub arViewer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles arViewer.Load
    Dim rpt As New SectionReport1()
    rpt.ExpressionErrorMessage = "oops"
    rpt.Run()
    Me.arViewer.Document = rpt.Document
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SectionReport Class
SectionReport Members

 

 


Copyright © 2014 GrapeCity, inc. All rights reserved

Support Forum