Link to home
Start Free TrialLog in
Avatar of new_perl_user
new_perl_user

asked on

Cognos is supressing null data columns

Hi,

I am using cognos 10 and in one of the crosstab report  when a column has no data, it is being suppressed.

I already selected no suppression  option in the report, but still not working..

 Any solution/help please..
Avatar of SNeupane
SNeupane
Flag of United States of America image

Go to query.
Drag the data item for date you did above to the summary filter section on the right hand side.
[Calculated Date] is not null
Avatar of new_perl_user
new_perl_user

ASKER

Hi,

I guess this answer is for the other post/question I asked..:)

Will try that..

Can you please help out for this question..
Oh I see.
What you have to do is create fake data.
For the columns that don't have data, go to the query item that crosstab is using and add a condition on the data.
For example, add a 0 if null:
Original data expression: [Audit].[Count]
New expression: if([Audit].[Count] is null then (0) else ([Audit].[Count])

You can also use space or empty space.
This will give something other than null for that data item.
You have to check which data item is giving null and change one or all.
I tried that condition as

if ([Type] is null)  then(0)   else([Type])  but it erroring out as  below


User generated image
You can't use 0 for something that's not number.
You can use '0' though.
Just add single quote around 0.
You have to match if type to then and else data type .
it is working to some extent , but it is pulling wrong data.

the second column is also showing the first column data instead of  '0' and also no name in column

what I did is,

Create a calculated dataitem and wrote as expression as:

case
when ([type] ='B') then ('books')
when ([type] is null then ('0')
end

Dragged this data item into cross tab column

Next create another dataitem as:

case
when ([type] ='M') then ('Magzines')
when ([type] is null then ('0')
end

Dragged this data item into cross tab column

Output:

User generated image
any help plssss
ASKER CERTIFIED SOLUTION
Avatar of RWrigley
RWrigley
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial