COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: JO on 29 Aug 2005 04:04:35 AM

Title: check the value of prompts in FM
Post by: JO on 29 Aug 2005 04:04:35 AM
Hi,

I have a query which executes based on prompt value in FrameworkManager say

Select * from table1 where table1.column1=#prompt('Number','Integer')#

How to apply filter based on prompt value, say if prompt value is 0 then 10 else 20 to table1.column1 in frameworkmanager.

I am not able to check the value of propmts,

can anyone tell me how to do it?

Cheers
JO

Title: Re: check the value of prompts in FM
Post by: sridhar_world on 30 Aug 2005 06:24:48 PM
try something like below...

create a filter with the expression below and add the filter into the Query subject...

table1.column1  =  if(#prompt('Number', 'integer')# = 0) then (10) else (20)

let us know if your problem is solved...

Regards,
Sri
Title: Re: check the value of prompts in FM
Post by: JO on 31 Aug 2005 12:51:09 AM
Hi

These is not working.  giving some syntax error.

Cheers
Jo
Title: Re: check the value of prompts in FM
Post by: sridhar_world on 31 Aug 2005 11:51:56 AM
It does work for me when i tried the expression inside a filter...

r u adding the expression directly to the SQL? that doesn't work... u need to create a filter and add the filter to the query subject...

Regards,
Sri