COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: testuser on 25 Apr 2007 06:48:45 PM

Title: FM - Prompts
Post by: testuser on 25 Apr 2007 06:48:45 PM
Hi,
I am using a prompt in a sql based query subject in framework manager.
e.g. select (A.begindate - #prompt('Days','token',1) from table A

I using a text prompt in my report and I pass the value down to the sql when I run my report. By default, I want the text prompt to show 0 in my report.

The problem is that if the user chooses 0, I want the begin date to be one less than the date.
Example if begin date is 4/23/2007, the sql should process begindate -1. However, if the Days value in the report is anything other than 0 e.g. 9, the sql should process begindate-9.

To summarize:
How do I process the sql so that if the default 0 is passed down from the report,  the begin date is begindate -1 other wise the sql would calculate begindate -Days.
Title: Re: FM - Prompts
Post by: COGNOiSe administrator on 26 Apr 2007 08:57:38 AM
add a case when ...