how to sum four columns

Stimulsoft Ultimate discussion
Post Reply
mirmidone
Posts: 15
Joined: Thu Mar 29, 2012 8:55 am

how to sum four columns

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: how to sum four columns

Post 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.
mirmidone
Posts: 15
Joined: Thu Mar 29, 2012 8:55 am

Re: how to sum four columns

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how to sum four columns

Post 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.
Post Reply