Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos Report Studio -- create a default prompt value

If you are developing a Cognos Report Studio prompt page and you want to implicitly state or show the user that they must enter a prompt value, then you can set your own default value for the control.

For example, you would drag a HTML Item onto the prompt page and add the following .js script:


document.formWarpRequest._oLstChoicesMyList[0].text = '--SELECT A CITY--';

In this example the user is displayed a prompt control with text stating that the user must select a city. This can be helpful if you have a report with numerous prompts and the user needs to identify which values they did not populate prior to proceeding to the next prompt page or report execution.