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

Java Script in Prompt Page throwing Exception

Started by krishna.cog@gmail.com, 29 Apr 2013 07:42:47 PM

Previous topic - Next topic

krishna.cog@gmail.com

Hi Gurus,

I have a report which has Prompt and Report Page.  From the Prompt Page I have one Value Prompt and there is Java Script to bring the first value from the Value Prompt.  When I run this report it has to pickup the first value from the value prompt and run the report with the default value.  But it is getting me the Prompt Page and not passing the default value to the report.  so I changed the java script by adding promptbuttonfinish() is throwing me exception...

Note:  I enabled the Auto Submit Property for value prompt to Yes.  But still no use.

Java Script I used:
=======================
<script type="text/javascript">
function init()
{
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if (fW)
fW._oLstChoicesComp.options[2].selected = true;
canSubmitPrompt();
//promptButtonFinish();

// when I put this line promptButtonFinish();  it is throwing me the exception when I remove this from the java script it is bringing me          the Prompt Page.

}
init();
</script>
============================

I am getting the below error message.

RSV-BBP-0028

      The secondary request failed. The requested session does not exist and the secondary request does not contain enough information to recreate the session. Contact your Administrator.


My Objective is - when I run the report it has to take the first value from the value prompt and automatically pass it to the Report and bring the results.

Please advise.


krishna.cog@gmail.com

I fixed this issue.  I changed the java script is now working as is expected.
<script type="text/javascript">
function init()
{
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if (fW)
fW._oLstChoicesComp.options[2].selected = true;
setTimeout("promptButtonFinish();",0);
}
init();
</script>