If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

value prompt

Started by johny.cbi, 04 Feb 2008 02:47:10 PM

Previous topic - Next topic

johny.cbi

In a report I've value prompt  (YTD, QTD, MTD)

when I run the report it has to display automatically YTD

please share your ideas

Suraj

Use a html item and javascript to auto select the prompt values.
<script language = "javascript">
document.forms["formWarpRequest"].elements["_oLstChoices<fieldname>"].selectedIndex = 2;
</script>
Where <fieldname> is the name of the prompt under properties, name.

Check cognos document:
http://support.cognos.com/knowledgebase/googlesearch?load_kb_document=1&dr=kb1&uniqueid=114497

rockytopmark

This code is valid in 8.2 and earlier but apparently not in 8.3... does anyone have updated syntax for 8.3??

Suraj

That's interesting...
So it doesn't work in 8.3?
We don't have 8.3 yet, so no help here...

johny.cbi


rockytopmark

I got this to work in 8.3...


document.formWarpRequest._oLstChoicesPromptControlName.options[2].selected =  true


... which selects the first value row (Row 3) in the list (row 1 is the item name and the row 2 is dashes)

I believe once the control is used, its name gets changed to some random value, making the code good only on initial render.