Page 1 of 1

how to sum four columns

Posted: Wed Sep 14, 2016 12:01 pm
by mirmidone
In a report I would like to add the totals of three columns. How to do this ?
How to create the variables to use in the report ?
Thanks for help

Re: how to sum four columns

Posted: Wed Sep 14, 2016 8:56 pm
by Alex K.
Hello,

You can use the Sum() or Totals.Sum() functions:

Code: Select all

{Totals.Sum(DataSourceName.Column1) + Totals.Sum(DataSourceName.Column2) + Totals.Sum(DataSourceName.Column3)}
Thank you.

Re: how to sum four columns

Posted: Fri Sep 16, 2016 12:00 pm
by mirmidone
thank you but it is not what I want. I explain the problem better ...
I have three columns down the reports that have the following code:
{Avg (DataSource1.price1)} {Avg (DataSource1.price2)} {Avg (DataSource1.price3)}
I want a text object that is the sum of these three columns...How to ?

Many thanks

Re: how to sum four columns

Posted: Fri Sep 16, 2016 1:36 pm
by HighAley
Hello.

You could use next expression to sum them:

Code: Select all

{Avg (DataSource1.price1) + Avg (DataSource1.price2) + Avg (DataSource1.price3)}
Thank you.