COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sergiord2016 on 03 May 2017 05:41:54 AM

Title: Master-detail report (don't want to show page when no details)
Post by: sergiord2016 on 03 May 2017 05:41:54 AM
Hi ,

I don't want to show this page when the dimension called "SERVICIO" has no data.

Now it shows like this , i want to omit this page of the report

(http://i66.tinypic.com/21317pe.jpg)

Do you know how can i omit the page when the master dimension has no details data?

(filtering in the query is not an option for me right now)

Thanks in advance for your help.
Title: Re: Master-detail report (don't want to show page when no details)
Post by: AnalyticsWithJay on 03 May 2017 07:27:22 AM
Select the page. In the properties pane, you'll see a "Render Variable" property, which is what you'll use to define when the page renders.
Title: Re: Master-detail report (don't want to show page when no details)
Post by: sergiord2016 on 03 May 2017 10:13:29 AM
Hi ,

I have located the option but i am not sure about how to configure that option.

Assuming taht my dimension is called "Service" , could you make me an example to configure render variable to omit pages with no details?

Title: Re: Master-detail report (don't want to show page when no details)
Post by: New_Guy on 03 May 2017 11:35:10 AM
Hi,
Create a render variable '[service] is not  null' and then assign it to the page. Also if it is a list there is a property called render page when empty, if I am right. Let us know if you still face any issue.
Good luck
New guy
Title: Re: Master-detail report (don't want to show page when no details)
Post by: sergiord2016 on 03 May 2017 11:56:18 AM
Hello ,

When i try to create the render variable , i have to choose between a boolean , string or language variable.

What type should i select?

Remember that the Service dimension is not null , the null values are those from details...

Thank you in advance.
Title: Re: Master-detail report (don't want to show page when no details)
Post by: New_Guy on 03 May 2017 11:59:33 AM
Hi,
Create a boolean variable as [detail]is not null and try. Let us know if there is any issue.
Good luck
New guy
Title: Re: Master-detail report (don't want to show page when no details)
Post by: sergiord2016 on 03 May 2017 12:02:38 PM
ok , it shows an error:

CRX-API-0016 , (i translate from spanish) The entry string of the expression is null ""..

I have tried with several details...
Title: Re: Master-detail report (don't want to show page when no details)
Post by: CognosPaul on 03 May 2017 12:12:21 PM
If the master query doesn't have sufficient information to suppress the page from being generated, a render variable won't work. The variable will process on the level of the master, not detail.

Instead, set one of those lists to "Render Page when Empty: No".

Take a look at the attached report. I'm generating a list of all the product lines. There's a page set that shows the revenue for each product line for 2010. Mountaineering has no data in 2010, so using "Render Page when Empty: No", the Mountaineering page doesn't render. Setting it to Yes will show a page for Mountaineering, but it will return no results.
Title: Re: Master-detail report (don't want to show page when no details)
Post by: New_Guy on 03 May 2017 12:22:17 PM
Hi,
[list Query].[xxxxxxxxx] is not null is working for me. Just saw Paul's reply, try that first and if it does not work try [Summary] is not null and [Detail] is not null and let us know.
Good luck
New guy[/list]