COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kakumanu on 10 Apr 2012 09:01:57 AM

Title: No Data Availabe message in Cognos 10.1
Post by: kakumanu on 10 Apr 2012 09:01:57 AM
Hi,
I have an issue with the List report in cognos 10.1. In my report i have list and in that  i placed one table
with text and corresponding query items. The problem here is there is no data in the database for the particular dataitems. But i want to display the null values with the 0.00%. i tried with data format property and by writing case statements.
Case statement: case
                            when [query item1] IS NULL
                            THEN (0.00%)
                            ELSE
                            [query item1]
                            END
But still in the ouput the list is not appearing. It is only showing the text specified in the no data contents property of that query item.

Please suggest is there any way of achieving this.

Thanks!!
Title: Re: No Data Availabe message in Cognos 10.1
Post by: RL_Boston on 12 Apr 2012 12:16:32 PM
Does Data Format work? The option for Blank value to display specified text
Title: Re: No Data Availabe message in Cognos 10.1
Post by: Lynn on 13 Apr 2012 07:30:03 AM
If the query returns no data then there is no result set to display or to base subsequent query calcuations against. Your case statement won't ever be evaluated if there isn't any data returned by the query. There won't be a row with a null value...there just simply won't be a row.

You could just modify your no data contents to include a table that looks just like your list would have looked had there been any data to display. Then put the text and 0.00% in there.
Title: Re: No Data Availabe message in Cognos 10.1
Post by: kakumanu on 13 Apr 2012 02:16:31 PM
Thanks Lynn!

I tried in the same way as you said it worked for me.
Really thanks for your suggestion.

Title: Re: No Data Availabe message in Cognos 10.1
Post by: Lynn on 13 Apr 2012 02:33:21 PM
Great! Glad you got it working :)