COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: seancadie on 15 Sep 2012 07:19:34 AM

Title: hiding a column
Post by: seancadie on 15 Sep 2012 07:19:34 AM
Hi All,

Can you anyone advise me how to hide a column in the list report?

Thanks
Sean
Title: Re: hiding a column
Post by: tjohnson3050 on 15 Sep 2012 07:47:52 AM
There is a render variable property for a list column, you can create a variable based on a prompt and use that variable to show or hide a column based on a prompt choice.
Title: Re: hiding a column
Post by: seancadie on 15 Sep 2012 02:02:11 PM
i try this and let you know, thanks.
Title: Re: hiding a column
Post by: wyconian on 17 Sep 2012 03:08:52 AM
Depends on whenever you want to show the column at some point or if you never want to see it.  If you never want to see it just cut (not delete) it from the report page.  It should still be in the query so you can still use the column for calculations etc etc .

If you want to see the column under certain situations but not under others use the render variable on the column.  You will need to set up a booelan variable which evaluates to true/false depending on when you want to show/hide the column.

Good luck :-)
Title: Re: hiding a column
Post by: kris123 on 18 Sep 2012 06:27:55 AM
Is Render=No and "Cut" the same? in terms of query execution
Title: Re: hiding a column
Post by: tjohnson3050 on 18 Sep 2012 08:35:52 AM
Yes, in either case the column will not be included in the select statement - unless it is overridden using the 'properties' property of a list object.
Title: Re: hiding a column
Post by: wyconian on 20 Sep 2012 03:49:58 AM
Render = No has a performance hit (even if only a small one) as you're asking the query to evaluate a booelan expression to determine whether to render the column or not. 

Cut the column from the report page includes the column in the query but just doesn't include it on the report page.

The performance differnce is likely to be very small, possibily not even noticeable but it's good to understand what's going on :-)
Title: Re: hiding a column
Post by: kris123 on 20 Sep 2012 09:22:41 AM
thanks wyconian