COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: screations9 on 24 Dec 2009 09:43:21 AM

Title: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: screations9 on 24 Dec 2009 09:43:21 AM
hi everybody when i am placing a data item with varchar2 in measures in cross tab , its not showing any values in output .please help me its really urgent and most important for my job.. i know that in general measures are numeric but always challenging task will be like this to do something which never happened ??
please help me
Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: Sreeni P on 24 Dec 2009 11:33:46 AM
Hi screations9,

Alias with data item, in that 'cast' the original data item with numeric type
Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: Sreeni P on 24 Dec 2009 11:46:07 AM
hei...screations9,
Sorry for my reply, it's not possible in your case....and it is not possible to cast a varchar data to numeric..
may be we can share with our moderators of this forum..
Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: MFGF on 26 Dec 2009 05:11:20 AM
Hi,

Crosstabs in Cognos 8 are not designed to use non-numeric measures.  So far I've not come across anyone who has been able to come up with a working solution.

The only option I can suggest is that you log an enhancement request with IBM.

MF.
Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: blom0344 on 28 Dec 2009 05:32:59 AM
you NEED to bring in a numerical value (with an aggregate set) to the crosstab body. However you can 'trick' Cognos to show non-numerical values by defining a report expression as source type for the crosstab fact cells:


CASE
WHEN [Que: 4. ].[FASE_NUM] = 0 THEN '-'
WHEN [Que: 4. ].[FASE_NUM] = 1 THEN 'SO'
WHEN [Que: 4. ].[FASE_NUM] = 2 THEN 'SV'
WHEN [Que: 4. ].[FASE_NUM] = 3 THEN 'SB'
WHEN [Que: 4. ].[FASE_NUM] = 4 THEN 'EB'
WHEN [Que: 4. ].[FASE_NUM] = 5 THEN 'EP'
ELSE '' END


It looks like this is not a matter of 'designed as works', but all 8 versions accept this 'trick' ...

Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab report
Post by: angela on 29 Dec 2009 04:23:45 PM
You can also put a fake data item (like the number 1) in the body, unlock the report, drag your text item in the cell next to the fake numeric data then use formatting to hide the number one (font color or some such).
Title: Re: data item with varchar2 as measure in fact cells of COGNOS 8.3 cross tab rep
Post by: actcognosuser on 31 Dec 2009 08:52:43 AM
Unlock .In the crosstab properties set Define contents asYes and drag in the varchar data item.

Also changing the aggregation properties might help.