Avoiding exception in expression
Posted: Fri Apr 29, 2011 6:03 am
I have set StiOptions.Dictionary.HideRelationExceptions = true and I'm using the following expression:
({Round(Departments_Report.Amount * 100 / Sum(Departments_Report.Amount))}%)
When Departments_Report is empty I get an exception about the Amount property not beeing available.
It's working fine, when just using {Departments_Report.Amount} - the exception only happens when the expression is more complex like the one above.
Is there a way to suppress this exception, when the dataset is empty?
I could set StiOptions.Engine.HideExceptions = true, but then I'm afraid to miss some other excepions, which might be important.
BTW: The exception thrown is just a System.Exception which makes it hard to selectively catch this.
({Round(Departments_Report.Amount * 100 / Sum(Departments_Report.Amount))}%)
When Departments_Report is empty I get an exception about the Amount property not beeing available.
It's working fine, when just using {Departments_Report.Amount} - the exception only happens when the expression is more complex like the one above.
Is there a way to suppress this exception, when the dataset is empty?
I could set StiOptions.Engine.HideExceptions = true, but then I'm afraid to miss some other excepions, which might be important.
BTW: The exception thrown is just a System.Exception which makes it hard to selectively catch this.