If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Converting a number to a string.

Started by Rowan, 30 Jan 2008 07:41:59 AM

Previous topic - Next topic

Rowan

Hi There.

I have seen this topic sort of discussed a few times recently but they always seem to assume access to the oracle database.

I have a data item that returns a number 1 thru 12 and I would like to convert it to display as the Month so 1 would display as January.

Is this possible to do in Report Studio?

almeids

Do you mean that for some reason you don't want to use Oracle functions, like below?

to_char(to_date(to_char([your numeric column],'09'),'MM'),'Month')

Rowan

I can use oracle functions inside Report Studio?

Unfortunately I'm pretty much a novice at this and been given a monster of a dataset that I can't change and must mould to fit the requirements from inside Report Studio.

almeids

You can if the Oracle function set is included in the package you are working with, and I can't imagine that it wouldn't have been if that's your platform.  I'm not sure exactly "where" you can use them in C8 - we are still running Reportnet, where you can use them at the Tabular level but not at Query level.  Try putting the function in a calculated data item and see what happens.

almeids

Another alternative, if you simply need to display the month name rather than use it in subsequent calculations, using Cognos function only:

_make_timestamp(2008,[your numeric value],1)

...then format the item on your report as Date with long display of month and no display of year or day