COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kwierinc on 19 Oct 2007 04:06:17 AM

Title: Value Prompts in Report Studio 8.1
Post by: kwierinc on 19 Oct 2007 04:06:17 AM
When using Value Prompts in RS 8.1 does a developer have the ability to specify a help text within that object, for the user that will run the report. Or do we have to put a text object above the Value Prompt to more clearly show what the user needs to do, when specifying value for the prompt.
Title: Re: Value Prompts in Report Studio 8.1
Post by: Suraj on 19 Oct 2007 12:32:28 PM
We use a text above the prompts that explains what to do.
You can also name the variable with a self explanatory text such as ?Select_Business_ID?.
Title: Re: Value Prompts in Report Studio 8.1
Post by: kwierinc on 19 Oct 2007 01:13:56 PM
Thx ... will use that technique.
Title: Re: Value Prompts in Report Studio 8.1
Post by: Feanor on 23 Oct 2007 07:00:20 AM
In addition to the solution method explained above:

Default behaviour of the value prompt is that the name of the query item is used to fill the label of the first item in the drop down list. In practice, this is not always sufficient to display a usefull help text for your users.

It is also possible to manipulate the label of the items in the drop down list. This way you are flexible to specify the exact "help" text for the user to see. To do this you'll have to add a HTML item to the report page. Use the following JavaScript to manipulate the drop down list. Make sure the name property (Miscellaneous - Name) of the value prompt object is the same as the "_myValueList" part in the script. You can change the name if you like, off course. ;)

You can also find several articles about this in the KB @ Cognos support.

Quote-------------------------------------------------------------------------------------------
<script language="javascript">


document.forms["formWarpRequest"].elements["_oLstChoices_myValueList"].options[0].text = "My Custom Text";
document.forms["formWarpRequest"].elements["_oLstChoices_myValueList"].options[1].text = "----------";


</script>
-------------------------------------------------------------------------------------------