If you are unable to create a new account, please email support@bspsoftware.com

 

Pass a parameter used in a prompt macro as a render variable on prompt page

Started by dmburke11, 16 Sep 2013 02:50:24 PM

Previous topic - Next topic

dmburke11

Hi - I am new to Cognos so bear with me  ;D

I'd like to have a prompt page where the user selects a report type (this will drive a dynamic list on the report page.) This part I have done using a prompt macro / calculated query in the list.


Here's the part I can't figure out. I'd also like to have additional value prompts on the prompt page that render based on the Report Type selection.

For example, if the Report Type is 'State View', a value prompt allowing for the selection of a state appears. If the Report Type is 'Product View', a value prompt allowing for product selection appears.

Can this be done using the existing 'Report Type' parameter?

Any help is greatly appreciated. Thank you all!

wyconian

Hi

I don't know if yiu can do this using the report type parameter but here's how I would do it.

On a prompt page add a conditional block, put your prompt insude the prompt so you have one block for state prompts, another for product prompt. 

Create a variable based on the returned value of your prompt. If you only have 2 possible values you can use a booelan prompt, if you have more try using a string prompt.  The syntax of the boolean prompt would be something like paramDisplayValue(?prompt_name?) = value.  The possible values are true/false or yes/no.

For the string variable the synatx is something like paramDisplayValue(?prompt_name?), the possible values would be the values that can be selected in the prompt.

Once your variable is set up you can select the conditinal block to be rendered for any combination of possible returned values as necessary. You can set this as one of the pronperties of the conditional block.

Hope that makes sense.  If you're unsure how to do any of that try researching render variables and conditional blocks.

Good luck :-)