COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: thedon_1 on 20 Feb 2012 09:46:07 AM

Title: Cascading prompts with static choices
Post by: thedon_1 on 20 Feb 2012 09:46:07 AM
I have a data item called City or Town with the following macro #prompt('Dimension1','token')#.
I then have a value prompt with static choices [City] and [Town].

When the user selects City, the data item pulls in City, when they select Town, the data item pulls in town.

I want another value prompt so that when I select City, it brings me a list of Cities. I tried to set a cascading prompt on Dimension1 but it doesn't fill up with any data.

Any ideas?

Thanks
Title: Re: Cascading prompts with static choices
Post by: navissar on 20 Feb 2012 10:06:10 AM
few ways really:
if town and city are different data items and your are not on a dimensional data source, make the use value of the second prompt something like "case ?Dimension1? when "city" then [city] else [town]".
if they are the same data item and there's a town/city flag, use a filter on the second prompt's query.
Or you can put in two prompts and display/undisplay them using a render variable based on your parameter.