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.
try cast(DataItem1 as VARCHAR(20)) || 'KM'
this works for me at least
Hi Adik,
For me its not working. Still I am getting the same result as 1.4015E1KM.
Hi,
maybe you could apply a number format to dataitem1, i case you hadn't already.
Hunter
Did't worked :(
where in the report are you trying to display the casted data item? in a list/crosstab measures cells?
Its in list.
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)
It worked.
Thanks Adik. :)