COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: srinu_anu2007 on 18 Mar 2014 06:17:13 AM

Title: No Data Content
Post by: srinu_anu2007 on 18 Mar 2014 06:17:13 AM
Hi,

I want to display Crosstab with no data message if there is no data. when iam setting no data property it was not giving me any message and my rows and columns it remains showing the some zeros. If iam doing the suppression for rows and columns, am able to see "no data available" message with out crosstab but i want to show in crosstab(rows, columns and in middle to show no data message)

Can any one suggest the same. I am using 10.2+DMR model.

PFA

Thanks,
Title: Re: No Data Content
Post by: srinu_anu2007 on 18 Mar 2014 11:27:10 PM
Please Find the attachement.

Thanks,
Title: Re: No Data Content
Post by: Ammus1234 on 19 Mar 2014 01:17:53 AM
You can try to place a text inside the fact cell and do a conditional display when CellValue () is missing
Title: Re: No Data Content
Post by: srinu_anu2007 on 19 Mar 2014 02:03:06 AM
Hi Ammus,

Thanks for your reply  and the things are not working. I added the text and applying the conditional style for that text like
if ([Crosstab_Query].[Year To Date Average] is null)

then ('No Data Available')

else ([Crosstab_Query].[Year To Date Average])

end

its giving me an error. Invalid expression if ([Crosstab_Query].[Year To Date Average1] is null) then ('No data avail') else ([Crosstab_Query].[Year To Date Average1] ) end. CRX-YXX-4010 A parsing error was found at or near the position 130 in the expression " if ([Crosstab_Query].[Year To Date Average1] is null) then ('No data avail') else ([Crosstab_Query].[Year To Date Average1] ) end ".
Title: Re: No Data Content
Post by: Ammus1234 on 19 Mar 2014 02:21:06 AM
As I mentioned in my previous post you can use CellValue () function for checking the missing facts.
You can create a boolean variable with 'CellValue () is missing' and apply Text source variable to the text item.
Title: Re: No Data Content
Post by: srinu_anu2007 on 19 Mar 2014 04:14:33 AM
No idea how to use can you give me an example.
Title: Re: No Data Content
Post by: srinu_anu2007 on 19 Mar 2014 11:35:42 PM
Hi Ammus,

As you suggested i have assigned boolean variable to the text "No data available" if yes i have given the text as "No data content"

i have given in variable CellValue ([Crosstab_Query].[Year To Date Average1]) and it was giving me an error. can you help how to resolve this one.

Thanks
Title: Re: No Data Content
Post by: Ammus1234 on 20 Mar 2014 01:08:32 AM
Which version of cognos do you use? I will try to create a sample for you in 10.2.1.
Title: Re: No Data Content
Post by: srinu_anu2007 on 20 Mar 2014 01:19:11 AM
iam using 10.2
Title: Re: No Data Content
Post by: Ammus1234 on 20 Mar 2014 01:58:35 AM
Here is one sample report. But you may have to adapt it to your requirement.
Title: Re: No Data Content
Post by: srinu_anu2007 on 21 Mar 2014 01:22:33 AM
Thanks, it's working fine.