I have a Cognos 8.4 report that displays data as UPPER Case i.e, APPLE ORANGE BANANA I wish to display these as Title Case i.e, Apple Orange Banana Can this be done in Report Studio as the no changes can be made at the database level. Thanks, Steve
Thanks Deepak that worked perfectly!
Ashish’s answer would be the way I’d do it. Unfortunately, going to all-upper or all-lower case is much easier than converting to Title.
Thanks Ashish!!
Could you please provide a example of what the code would look like.
I thought there was an initcap function, but now I can’t find it! Hard to believe there isn’t something. Perhaps your database software has such a function.
Hi Steve,
Try this
upper(substring([nnew].[Customers].[CustomerLname],1,1)) || lower(substring([nnew].[Customers].[CustomerLname],2,2000))
We have cognos functions which can do the same.
Extract all the alphabets but the first alphabet in a data item
Eg In case of APPLE, extract PPLE and use lower() function.
Then CONCAT the first alphabet + the extracted dataitem
Thanks & Regards,
Ashish.
From: steve257 via cognos8-l [mailto:cognos8-l@groups.ittoolbox.com]
Sent: Friday, June 11, 2010 3:42 PM
To: Malhotra, Ashish (MLITS)
Subject: [cognos8-l] Modifying Letter CASE in Report Studio
Posted by steve257
on Jun 11 at 6:15 AM
I have a Cognos 8.4 report that displays data as UPPER Case
i.e,
APPLE
ORANGE
BANANA
I wish to display these as Title Case
i.e,
Apple
Orange
Banana
Can this be done in Report Studio as the no changes can be made at the database level.
Thanks,
Steve
initcap ( string_expression )
Returns “string_expression” with the first letter of each word in uppercase and all other letters in lowercase. Words are delimited by white space or characters that are not alphanumeric.
Jeffery, your solution is perfect and simple, why to make our life so hard
Re: Initcap function.
This function is under Vendor Specific Functions > Oracle
It works exactly as needed. This not only cap the first letter of the description; it caps first letter of each word in the description