Home » Developer & Programmer » Reports & Discoverer » add values from 3 cloumns into a new column
add values from 3 cloumns into a new column [message #88358] Tue, 16 July 2002 18:05 Go to next message
George
Messages: 68
Registered: April 2001
Member
Hi,

Please help me to solve this problem:

My report is like this:

select ename, dname, f1(paras), f2(paras), f3(paras)
here f1, f2, and f3 are functions which return a number, I need to have another column TOTAL which equals to the sum of (f1, f2 and f3)

I know I can create another column (f1+f2+f3) TOTAL, but it will re_call the functions and redo the same calcs, is there any better way to do add the values withour re_calculate?

Thanks
Re: add values from 3 cloumns into a new column [message #88730 is a reply to message #88358] Thu, 27 February 2003 03:02 Go to previous messageGo to next message
priya
Messages: 108
Registered: February 2000
Senior Member
use subquery
select a.ename, a.dname, a.first+a.second+a.third total
from
( select ename,dname, f1(paras) first,
f2(paras) second, f3(paras)third
from tablename) a
Re: add values from 3 cloumns into a new column [message #88733 is a reply to message #88358] Thu, 27 February 2003 13:10 Go to previous message
Sathish.K
Messages: 13
Registered: February 2003
Junior Member
If it's in the report means just add one formula column which will return number

in that add this three column value return it . Hope this will ok for you

Sathish.K
Previous Topic: Select NOT IN not bringing nulls
Next Topic: server name in seagate crystal reports(Immediate help )
Goto Forum:
  


Current Time: Fri Apr 19 10:25:20 CDT 2024