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

Concatenation issue

Started by ravikrsingh, 22 Feb 2013 02:42:49 AM

Previous topic - Next topic

ravikrsingh

Hi All,
I have a field Distance (which is of datatype DOUBLE in DB2). This field contains data in meters.So I am dividing it by 1000 to convert in KM. DataItem1 = Distance /1000 ex: 14015/1000 = 14.015 which I am getting correctly.

In the next data item I am trying to display this with KM.
DataItem2: cast(DataItem1,VARCHAR(20)) || 'KM'. In this case it returns 1.4015E1KM.

Can anyone pls tell why I am getting the value like this.



adik

try cast(DataItem1 as VARCHAR(20)) || 'KM'
this works for me at least

ravikrsingh

Hi Adik,

For me its not working. Still I am getting the same result as 1.4015E1KM.

RandomHunter

Hi,

maybe you could apply a number format to dataitem1, i case you hadn't already.

Hunter

ravikrsingh


adik

where in the report are you trying to display the casted data item? in a list/crosstab measures cells?

ravikrsingh


adik

in this case why don't you put in the list DataItem1, unlock cells and drag a text item next to it in the cell and type " KM" (without the quotes)

ravikrsingh