Tool: Report Studio. Cognos 8.2
Hi
I have a "Value Prompt" with the collection of recent years: 2004, 2005, 2006, 2007.
and want to assign the current year as the default value for that object.
How could I do that?
If it's via Javascript code, Where could I find the list of objects\methods that we can use within a report?
Thanks a lot
You can use this javascript
var Cognos = {
Dropdown: '_oLstChoices',
Textbox: '_textEditBox'
}
var Form = {
Control: function (name) {
return document.getElementById(Cognos.Textbox + name)
|| document.getElementById(Cognos.Dropdown + name)
|| document.getElementById(name)
|| false;
}
}
Example usage (You must name the control in Report Studio, here 'year' is the name):
alert(Form.Control('year').value;