COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sspk on 12 May 2010 10:43:29 AM

Title: Default value in Value Prompt
Post by: sspk on 12 May 2010 10:43:29 AM
Hi All,
I have created a value prompt on a date dataitem  and  the select UI is Drop down list.Now i want to see the latest date in the list as  the default value when i run the report. I am trying to use a javascript for this , but it is not working out.
Any ideas please
Title: Re: Default value in Value Prompt
Post by: kattaviz on 12 May 2010 01:17:31 PM
Hi,

Sort the values in the prompt in descending and select the second value using javascript.

----------------------------
listBoxXXX.selectAll();
document.getElementById('formWarpRequestRS')._oLstChoicesXXX.options[2].selected=true;
----------------------------
Where XXX is the name of your prompt control.
HTH,

Satish Katta