COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: james899 on 09 Feb 2011 06:26:38 PM

Title: Display fields based on value, hide fields that are always zero.
Post by: james899 on 09 Feb 2011 06:26:38 PM
I think this might be only something that can be done on a second filtered pass and I do not quite understand that yet either.

I have way too many column dimensions to show in a standard printout. Controlling the width is only a partial solution because the Titles are long. Most of most of the dimensions are zero for all rows on a report. I was wanting to only show dimensions if they were NOT zero for at least one row. There are a few I want to show regardless like beginning and ending balance but most are zero for all rows. The problem I see is a dimension may have a value for only one row and zero for the rest but it has to be shown. Is there a way to remove the dimension if it always contains zero for the report? Even if this means using that ParamValue or similar function it would be worth it to add that for all dimensions once. I am not sure how to do that but there are other articles on that here.
Title: Re: Display fields based on value, hide fields that are always zero.
Post by: Lynn on 10 Feb 2011 07:04:05 AM
Is it a list or a crosstab? There is a suppression property for crosstabs that might be what you're after. For lists you can use render variables on a column or a conditional style to do it.
Title: Re: Display fields based on value, hide fields that are always zero.
Post by: james899 on 10 Feb 2011 11:10:38 AM
Thanks for the reply. It is a list right now. I just started using this tool 2 weeks ago. I will experiment with crosstabs and see if that helps. Where in tool is the suppression property? Do I need to have it unlocked, do I need to be in design or structure mode?

I will have to research render vaiables and conditional style for lists. I saw a little on it but have not tried those yet. I hope what I need is more intuitive than column width because that has been a nightmare. I have another post thread on that one. When I try these other things I will reply.
Title: Re: Display fields based on value, hide fields that are always zero.
Post by: Lynn on 10 Feb 2011 11:25:18 AM
Suppression is a property of a crosstab container. If you drag one to your page and then click on it, you can use the ancestor button to navigate to the highest (crosstab) level. There you will find the suppression property.

No need to unlock anything to get to it.

Design mode vs. structure mode is irrelevant. They are just two different ways to view the same thing. The objects and properties are no different when in one vs. the other.

I should point out that the decision to use a list vs. crosstab would encompass more than just the need to suppress. I can't really say if it is a better way to achieve your requirements or not.