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

Trouble on cast ... need some help

Started by fgarav, 21 Jul 2009 03:32:22 AM

Previous topic - Next topic

fgarav

Hi everybody, hope that someone can help me to understand the way how to solve this problem...
I use the code posted to rappresent number of hour , but this code return a datatype CHAR and i can't use on Report Studio to do some calculation , if i wan use ,suppose that i must convert this on int type ... how i can do that?

if ([Foundation Object View].[trANSACTIONPERMINUTES].[REDHH] <10) then ('0'+ cast([Foundation Object View].[trANSACTIONPERMINUTES].[REDHH];varchar(4))) else
    (cast([Foundation Object View].[trANSACTIONPERMINUTES].[REDHH];varchar(4)))


bye

lindero

It's only an idea but why do you set the formating with a conditional if-clause? it is an integer by nature and you can use in Framework Manager the property "DataFormat" to format the value of this dataItem. if you don't cast it to a character, youu are still able to use it as a part of a calculation.

cheers,
LinderO