Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

String Manipulation in Rational Cognos Report Studio

Hi,

I would like to ask if anyone knows how to perform string manipulation in Cognos Report Studio? I have queried data from RQM with a name format "SprintNumber-Project-TestType-Other". I need to query data based on 'TestType' and create a table for them. So basically I need manipulate the name string, use the dash(-) as a filter and get the third field so i can have a list of test cases with which belongs to the same TestType.

It would be appreciated if anyone can provide information on how we can achieve this on the report. We are using IBM Cognos Report Studio Version 8.4.1.

Thank you in advance.

1

0 votes



One answer

Permanent link
We do a lot of string manipulation in Report Studio and I use the Cognos string functions, most commonly a combination of the 'substring' and 'position' functions. 

http://pic.dhe.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id59246_substring.html

For a simple example, to get all text after the first '-' in your data item you'd do something like this:
substring([Field], (position ('-', [Field]) + 1))
I know I've ended up with some pretty complex nested substring/position combinations depending on what I'm parsing out, but hopefully this points you in the right direction.

1 vote

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 22 '13, 7:40 a.m.

Question was seen: 16,310 times

Last updated: Oct 22 '13, 4:56 p.m.

Confirmation Cancel Confirm