Thursday, December 09, 2010

Cognos Report Studio: How to replace '1' and '0' with 'Yes' and 'No'

If you need to replace the values '1' and '0' with 'Yes' and 'No' in Cognos Report Studio you will need to add a new Data Item with an Expression Definition.

- Open the report in Cognos Report Studio and open the query in the query explorer.

- Add a new Data Item and use as Expression Definition:
if([Databasefield] <> '1')
then ('No')
else
('Yes')


- Now open the page explorer and add the Data Item as a column. You will now see a list containing Yes and No values.