COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: dougp on 21 Aug 2014 11:09:01 AM

Title: Optional parameter
Post by: dougp on 21 Aug 2014 11:09:01 AM
I would like to make a parameter optional.  I expected that a filter defined this way would work:

[Namespace].[QuerySubject].[QueryItem] = coalesce(?ParamName?, 'SomeValue')

Unfortunately, if I make the filer optional, it's not used at all.  If I make it required, it forces me to answer a prompt for the parameter.

Is there a way to make a parameter optional and specify a default value to use if it's not provided?  Where is the UI to manage parameters?
Title: Re: Optional parameter
Post by: Lynn on 21 Aug 2014 11:43:03 AM
You can include a prompt control on a prompt page or on the report page and then set the default value there. The coalesce would not be necessary in your filter expression.
Title: Re: Optional parameter
Post by: dougp on 21 Aug 2014 12:14:47 PM
Thanks, but I don't think that will work.  I have 3 filters.  I want to require the user to enter a value in at least one of the prompts.