Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a prompt based on previous selection on Prompt Page 2

Status
Not open for further replies.

elsolo21

Programmer
Apr 7, 2008
26
US
I have a value prompt where one of two static options can be selected. From that selection, I'd like a prompt to appear with the values of the selected option.

For example:

First prompt: Do you want values by Country or Continent?

If Country is selected, then display another value prompt listing the countries. If the other is selected, then show those values.

Right now I have it so I can make my first selection and then I get a Cognos generated prompt (not from a prompt page). It works this way but it's not user friendly.

Any help would be great.
thanks,
-Eric
 
I actually got this to work with a Conditional Variable with the 'box type' property and a second prompt page so I think I'm set unless anyone knows how you can do this with one prompt page (not a big issue).

thanks,
-Eric
 
If you want the option to run the report other than in HTML, then you should move the prompts in any case to a prompt page..

Ties Blom

 
To do something similar with conditional formatting on a single prompt page, you'll need to use cascading prompts as Wallace suggests, and that requires that the first prompt be query-driven rather than static. If it's currently static you'll need to drive it with a 2-row query in order to fool Cognos.
You could also dispense with the conditional formatting (but still cascade) by having only a single second prompt and conditionally populating it with either Countries or Continents. This will make the report query filters a bit more complex as they will also need to examine the value of the first prompt, something like:
(?prompt1?='Country' and [country]=?prompt2?) or (?prompt1?='Continent' and [continent]=?prompt2?)
 
Hmm, that is some pretty good info. Have a star for your tip!

Ties Blom

 
I am new to cognos and have similar requirement as above and I tried as u said but it did not work for me. Could you please let me know this in detail?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top