Tuesday, January 31, 2017

How to display a prompt conditionally based on a selection. made in another prompt on the same page in Cognos BI

Use a Conditional Block List to contain the prompt that you wish to display conditionally. In addition, place a re-prompt Prompt Button on the prompt page. Steps: These steps assume that you have already created your report and have defined your parameter filters. The filter for the optional prompt must have its Usage property set to Optional. To build the prompt page:
  1. Add a prompt page to your report
  2. In the File menu, click Variables.
  3. Create a variable of type Boolean.
  4. Add the following expression: ParamDisplayValue("Display_Option")= "Show"
  5. Add a table to the prompt page with the appropriate number of columns and rows for your needs.
  6. Add a prompt to one of the table cells.
  7. Select the parameter that this prompt resolves itself to.
  8. Add another prompt to the page, and set this prompt to resolve itself to the boolean variable created in step 3.
  9. Use the Static Choices property of the prompt to create values for it to display: Example: Use Display Show Show Hide Hide
  10. Add a Prompt Button to a cell on the table.
  11. Change the Type property of the Prompt Button to Re-prompt.
  12. Add a Conditional Block List to the one of the table cells
  13. Select the Conditional Block on the page.
  14. Set the Conditional Block property to the variable created in step 3.
  15. Set the Current Block property to Yes.
  16. Add the prompt that you wish to display conditionally to the Conditional Block object.
  17. Set the Current Block property to No. The Conditional Block appears empty.
  18. For the hidden prompt to display, select Show and click the Re-prompt button.
Using Auto-Submit attempts to submit the report. Ensure the auto submit properties of the prompts are set to No.

No comments:

Post a Comment