Solved

How to hide a  null column in Cognos 8

Posted on 2011-09-06
10
2,588 Views
Last Modified: 2012-05-12
Hi,

I want to hide a column which is null in one of my cognos report.

The rows of that column have data  but the column is empty and I need to hide it. It is a cross tab report.

                      report Design
0
Comment
Question by:new_perl_user
  • 5
  • 5
10 Comments
 
LVL 8

Expert Comment

by:SNeupane
ID: 36490819
What happens when you select the column and go to properties, click on 'Box Type' and set it to 'None'?
0
 

Author Comment

by:new_perl_user
ID: 36490865
when the data of that column is null then I need to hide, but sometimes it has data as shown below.

 REPORT
0
 
LVL 8

Expert Comment

by:SNeupane
ID: 36490979
You can't hide that column if some other rows have value in the same column.
If you hide the null cells, then the total value will move into that place and report  data will look messed up as some total will be in the 2nd for null and others will be in the 3rd.
With some conditional formatting, you may be able to hide the borders for the null cells but hiding doesn't work if there are some values.
0
 

Author Comment

by:new_perl_user
ID: 36491032
so is there any other workaround  for this issue to avoid the null columns. If so can you please let me know.

Thanks,
0
 
LVL 8

Expert Comment

by:SNeupane
ID: 36491103
Hiding doesn't make sense in this situation as you'll always have the space from the rows that have values.
You can only conditionally format using a variable to remove the border when value is null so it looks like one big cell instead of two cells.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:new_perl_user
ID: 36491134
oh ok. But these null values are coming when I wrote a condition to get only the states for 'US'.

Below condition is for 'US' only but I have no clue why it is pulling out even 'Canada' values as null data into the report.

case
when(substring([id],3,1)='U')
then ('US-' + upper("GET_INFO_PKG.GET_NAME" ([State Code])) + '   '  + 'TOTAL')  end

Is my condition wrong ..
0
 
LVL 8

Expert Comment

by:SNeupane
ID: 36491252
If you are getting correct data from the condition, it's good.
If it gives you extra null rows, you can deal that with a conditional variable.
Create a variable with a condition that checks the column for null.
Use that variable to hide the entire row including all cells on the null value.
Refer to Report Studio user guide on how to use the conditional variable for conditional formatting.
Then, the null rows will be gone.
0
 

Author Comment

by:new_perl_user
ID: 36491601
Hi,
Followed the below steps but it is not working..

1)  Created a Boolean variable with expression as :  if (state) is null
2)  navigated to the report selected the state column  and went to properties > style Variable.
3)  In style Variable selected the Boolean variable created.
4) then in conditional explorer selected the 'Yes' button and it turned green

But when I run the report still the same issue.

Am I missing something plss let me know.  Is my condition wrong to check for null values.
0
 
LVL 8

Accepted Solution

by:
SNeupane earned 500 total points
ID: 36491643
When it turned green, select all rows and all cells of crosstab except the column level on top and then set box type to 'None'.
0
 

Author Comment

by:new_perl_user
ID: 36492084
Thank you so much it worked.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now