Arithmetic operations in a field

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Arithmetic operations in a field

Post by Fabio Pagano »

I have a field called "Amount". I need to print a field with a value calculated on the "Amount", eg. the formula would be "Amount * 20 / 100".

So if "Amount" is 1000, the other field will print 200 (coming from 500 * 20 / 100).

Is there a way to do this, without creating a calculated column?

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Arithmetic operations in a field

Post by Edward »

Hi Fabio,

Please write the following in the Text expression of the StiText component:

Code: Select all

{IIF(MyDataSource.Amount = 1000,200,MyDataSource.Amount*20/100)}
Thank you.
Post Reply