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

 

getting undefined / unspecified error after js code for reset button in cognos11

Started by inu, 03 Apr 2017 09:01:41 PM

Previous topic - Next topic

inu

HI Team,

For reset button, which will set all prompts to default values, in cognos we must use js code. so i did.
<script type="text/javascript">
function clearRefresh() {

var oCR = cognos.Report.getReport("_THIS_");

var D_From = oCR.prompt.getControlByName("D_From");
var D_To = oCR.prompt.getControlByName("D_TO");
var P_Band = oCR.prompt.getControlByName("P_Band");
var P_Channel = oCR.prompt.getControlByName("P_Channel");
var P_Veritcal = oCR.prompt.getControlByName("P_Veritcal");
var P_Country = oCR.prompt.getControlByName("P_Country");


D_From.clearValues();
D_To.clearValues();
P_Band.clearValues();
P_Channel.clearValues();   
P_Veritcal.clearValues();
P_Country.clearValues();



oCR.sendRequest (cognos.Report.Action.REPROMPT);



} </script>

<input type="button" onclick="clearRefresh();" style="width:80; height:23; backgound-color:white; border:solid 1px grey; margin:2px;" value="Reset"/>


in checked in IE 11, and chrome  as well.
But , i am getting undefined error 'clearRefresh is undefined'. i dont understand , what kind of error is this.
Please find the screen short of error message.

Please suggest.



Regards,
Inam