COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kennedto on 23 Feb 2017 09:48:46 AM

Title: Limit prompt values in Filter
Post by: kennedto on 23 Feb 2017 09:48:46 AM
I am using Cognos 10.

I have a report that has a query that as follows
[LOCATION]=?LOCATION?
This presents a prompt for location that allows you to select all values  in the location field.
I want to limit this to just some of the values in the location field.
I am hoping for something like:
[LOCATION]=?('LOC1',...,'LOCN')?

How can I do this?
Title: Re: Limit prompt values in Filter
Post by: BigChris on 23 Feb 2017 09:59:16 AM
You're nearly there - your filter needs to be something like

[LOCATION] in ('Loc1', 'Loc2')
Title: Re: Limit prompt values in Filter
Post by: Lynn on 23 Feb 2017 10:01:19 AM
Are you relying on a generated prompt rather than using a prompt page? If so, try adding a prompt page and placing a prompt control on it. Have it sourced from a query that includes only the locations you want the user to be allowed to choose.

Chapter 12 of the report studio user guide covers this in detail.
Title: Re: Limit prompt values in Filter
Post by: kennedto on 23 Feb 2017 05:22:57 PM
I create a new page as you suggested and used the new variables where the old ones where and it works great.
Thanks