COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ar0421 on 08 Jul 2011 12:10:05 PM

Title: Drop Down Prompt
Post by: ar0421 on 08 Jul 2011 12:10:05 PM
I have following problem. I would like to populate dropdown box  on a prompt page from the query (state for example). I want first value to be selected to be 'None' which is not in the query. What is the best way to do it?

Thank you.
Title: Re: Drop Down Prompt
Post by: Lynn on 08 Jul 2011 01:22:14 PM
Add a static choice to the prompt control called "None" and make it the default.

You will need to modify your query accordingly so it knows what to do with a value of "None". Otherwise it would look for a state called "None" and never return results. Unless there is a state called None....my geography could be a little rusty  :D

Filter might look something like this:
(
?Select State? <> 'None'
and
[YourNamespace].[States].[State Abbreviation] = ?Select State?
)
or
(
?Select State? = 'None'
)


Personally, I would generally make it an optional filter. Selecting nothing from the prompt control doesn't restrict the result set in that situation.
Title: Re: Drop Down Prompt
Post by: ar0421 on 13 Jul 2011 10:53:09 AM
Thanks you for your help