If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

FM - Prompts

Started by testuser, 25 Apr 2007 06:48:45 PM

Previous topic - Next topic

testuser

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.

COGNOiSe administrator

add a case when ...