COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: karthikeya on 29 Mar 2011 05:47:45 AM

Title: stuck by a caliculated column and solved.. :)
Post by: karthikeya on 29 Mar 2011 05:47:45 AM
hi guys,
i have a measure column in my list report,
the measure represents salary of the employees now i have to create a caliculated column beside the measure which should display the measure (number) in words
ex:
if the measure is 3000 then in the caliculated column it should display as "three thousand" in words.....     SO WHAT SHOULD BE THE CODE IN THE CALICULATED COLUMN

i'm stuck with this requirement   :'(, fast response will be appreciated.
Title: Re: stuck by a caliculated column
Post by: Gopinath on 29 Mar 2011 09:55:43 AM
Seems to be a difficult request. You have to write an endless If then else....

May be somebody could give you a solution for this.

Title: Re: stuck by a caliculated column
Post by: karthikeya on 30 Mar 2011 01:44:39 AM

i tried with the following stmt its working.......... 8)
select to_char(to_date(5000,'J'), 'JSP') as IN_WORDS from dual     ;)
Title: Re: stuck by a caliculated column and solved.. :)
Post by: Ramesh Sanka on 01 Apr 2011 10:36:24 AM
to_char(to_date(sal.'J'),'JSP') is working fine in Oracle. But if you can write the same logic in cognos it is showing julian related error. Might we have to write some stored procedure function...
Title: Re: stuck by a caliculated column and solved.. :)
Post by: karthikeya on 04 Apr 2011 12:07:37 AM
Quote from: Ramesh Sanka on 01 Apr 2011 10:36:24 AM
to_char(to_date(sal.'J'),'JSP') is working fine in Oracle. But if you can write the same logic in cognos it is showing julian related error. Might we have to write some stored procedure function...

it is working fine in cognos too, please change your code it is (,) after sal not (.)