COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Kid_in_Cognos on 21 Jun 2016 08:24:22 AM

Title: Select ALL values in Value prompt
Post by: Kid_in_Cognos on 21 Jun 2016 08:24:22 AM
Hi,

I have 2 value prompts in the prompt page. Like 1 is country and 2nd is Distributor.

The user can select single value from the prompt to run the report. Also, He should be able execute the report for all the values by using static choice "ALL" . Can you tell me how can I write the condition for this scenario?

Thanks
Title: Re: Select ALL values in Value prompt
Post by: Binway on 21 Jun 2016 11:06:30 PM
I have seen a couple of Options for this.

#This will give you a list where all the values are highlighted
(?ProvState?) in ('Show All') and (1=1) or ([Inventory (query)].[Branch].[Province or state] in (?ProvState?))

#Add into the properties of the lookup box in Static Choices the value All then you can select a single value or the word All
([Inventory (query)].[Branch].[Province or state] = (?ProvState?)) OR 'All' = ?ProvState?

You can also change the query filter to optional in the usage field of the query filter properties, this is typically set to required.
When the prompt page appears, if the user makes no selection then all values are returned.
Title: Re: Select ALL values in Value prompt
Post by: mrcool on 22 Jun 2016 12:37:48 AM
you can make the prompt optional and edit the header text of the prompt to 'All'.
Title: Re: Select ALL values in Value prompt
Post by: sdf on 22 Jun 2016 03:48:02 AM
so you want to have 'ALL Countries' and 'All Distributors' ?
you said ALL is static choice so im concluding you dont have this as consolidated member in your source.
Title: Re: Select ALL values in Value prompt
Post by: Kid_in_Cognos on 22 Jun 2016 09:33:28 AM
Hi ,

Thanks for your replies. Actually mrcool suggestion has done the trick. Sorry ,I made a mistake by saying "All" as a static choise.

Regards