COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Kutti on 15 Dec 2010 11:39:09 PM

Title: Hide Blank columns in the list report
Post by: Kutti on 15 Dec 2010 11:39:09 PM
Hi All,

Can anyone tell me how to hide blank columns in the list report.

If all the rows in the column are blank then that column should be hidden at run time and if it has atleast one value then it should not be hidden.

Thanks
Title: Re: Hide Blank columns in the list report
Post by: Lynn on 16 Dec 2010 07:30:21 AM
You could try creating a query item that computes the total value of the columns and then use a render variable.

For example:
1) create a query item "TotalColumn" with expression: total([MyNumber] for report)
2) set a boolean render variable on the list column with expression: [Query1].[TotalColumn] > 0

Using a conditional style is another method instead of the render variable.

If the column is not a number, you can try the count function instead of the total function. This will automatically exclude null values from the count. If a blank value isn't actually a null value (e.g., an empty string vs. null) then create a data item that says if ([value] = '') then (0) else (1). You could then total this column as the basis for the render variable.
Title: Re: Hide Blank columns in the list report
Post by: jahnavi on 20 Dec 2010 05:24:54 AM
if you are using 8.4 then there is a function in the properties pane called supresstion just click on that and select what type of values you want to hide

Or else

in the filter write an expression like [dataitem1]<>0 .

Let me know if you are still facing the issue