COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Sudha on 17 Oct 2006 10:17:37 AM

Title: Format Number like this XX-XX-XXXX-XX
Post by: Sudha on 17 Oct 2006 10:17:37 AM
This might be a dumb question, but i tried and failed. Please help me out
I have a number which comes from DB2 DataBase, which needs to be formatted in this way XX-XX-XXXX-XX
Is there a way to set using the dataformat while reporting in ReportStudio.

I tried to explore using this tip from SupportLink Doc. <Please refer Page 53 in this link>
http://support.cognos.com/supported/supportlink/15n2/pdf/SL_vol15n2_100_full.pdf

Any ideas/help is really appreciated.
Thanks
S
Title: Re: Format Number like this XX-XX-XXXX-XX
Post by: mikegreen on 17 Oct 2006 11:32:32 AM
That solution won't work as it is using decimals to place the dash "-"

I would (either in Framework Manager or ReportStudio...) convert it to a text field, then do LEFT(column1,2) + "-" + MID(column1,3,2) + etc etc and build a text string that way.

Regards,

Mike