Avoiding exception in expression

Stimulsoft Reports.NET discussion
Post Reply
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Avoiding exception in expression

Post 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.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Avoiding exception in expression

Post by Ivan »

Hello,

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

Thank you.
Tobias
Posts: 104
Joined: Mon Nov 24, 2008 8:44 am

Avoiding exception in expression

Post by Tobias »

Just sent it to support@stimulsoft.com.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Avoiding exception in expression

Post by Andrew »

Thank you.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Avoiding exception in expression

Post by Ivan »

Hello,

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

Thank you.
Post Reply