COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: rama83 on 10 Jun 2009 07:01:41 AM

Title: QE-DEF-0405 Incompatible data types in case statement.Its Very Urgent
Post by: rama83 on 10 Jun 2009 07:01:41 AM
Hi All,

I am creating the report in Cognos 8.2 Report Studio.

Here i crated prompts on Year,Qtr,Month and Day.Here year-Number,Qtr-Char,Month-char and Day -date&time data types.And also i created one parameter for user selection
suppose in prompt page he select year he can see the year wise data............
Ex:-I created following Query item
Case Time_period
when ('year')     then (year)
when ('qtr')       then (quarter)
when ('month')  then (month)
when ('day')      then (day)
else (null)
end

When validating the query item i getting following error

QE-DEF-0459 CCLException
QE-DEF-0405 Incompatible data types in case statement.


Please any one give the solution its very useful for me
Thanks in advance

Regards,
Rama
Title: Re: QE-DEF-0405 Incompatible data types in case statement.Its Very Urgent
Post by: CognosPaul on 10 Jun 2009 07:31:23 AM
If you're not referencing that parameter elsewhere, you can use a token prompt macro.

Example:
#prompt('Time_Period','token','[Database].[Time].[Year]')#

In the prompt, set the use value to reference the table items.

For example:

UseDisplay
[Database].[Time].[Year]Year
[Database].[Time].[QTR]QTR
[Database].[Time].[Month]Month
[Database].[Time].[Date]Day