Page 1 of 1

Avoiding exception in expression

Posted: Fri Apr 29, 2011 6:03 am
by Tobias
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.

Avoiding exception in expression

Posted: Mon May 02, 2011 3:05 am
by Ivan
Hello,

Can you please send us a sample report template with data, which reproduces the issue?

Thank you.

Avoiding exception in expression

Posted: Mon May 02, 2011 6:13 am
by Tobias
Just sent it to support@stimulsoft.com.

Avoiding exception in expression

Posted: Mon May 02, 2011 6:18 am
by Andrew
Thank you.

Avoiding exception in expression

Posted: Thu May 05, 2011 6:30 am
by Ivan
Hello,

The problem is solved.
The patch will be available in the next prerelease build.

Thank you.