COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Aditi on 24 Oct 2011 10:10:32 AM

Title: How to introduce '-' in place of 0?
Post by: Aditi on 24 Oct 2011 10:10:32 AM
Hi All,

I have a crosstab in my report where i have SOURCE coming from the DB.I have to implement a value '-' in place of the Volume displayed against it. The volume is 0 in the DB. The condition goes like this--If Source = 'XYZ' then Volume to be displayed = '-' .
i have tried it by making a data item called "---" which says '-' but to no use.
How can i use it as a data item or filter so that i can fulfill the condition?
The query in which this condition is expected is being unioned with another query and then displayed in to the crosstab.

I am using no filters right now although i tried to use them..but all in vain.

Please help.

Thanks,
Aditi
Title: Re: How to introduce '-' in place of 0?
Post by: blom0344 on 24 Oct 2011 01:38:06 PM
Go to properties : format data. You can assign  -  for the zero character value
Title: Re: How to introduce '-' in place of 0?
Post by: Aditi on 25 Oct 2011 12:45:20 AM
Thanks for the Reply but i tried the same..i want '-' to display only for one SOURCE value.
If i replace zero characters by - then all the zeroes in d crosstab show '-' .
I will have to give a condition or something to achieve this.

Please help.
Aditi
Title: Re: How to introduce '-' in place of 0?
Post by: CognosPaul on 25 Oct 2011 05:09:55 PM
How are the different source values being displayed? Is it something like the following?

Corner | Source 1 | Source 2
-------+----------+----------
Row 1  |   1234   |   1234
Row 2  |   1234   |   1234


If it is, create a Boolean variable:
[Source] = 'Source 2'
Set it on the measure and use that to set the data format as Ties suggested.