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

Report Studio 8.3: Reset a parameter trough javascript

Started by dzuser, 12 Aug 2015 12:11:34 PM

Previous topic - Next topic

dzuser

Hi,
I want to filter a report trough a text prompt and javascript, selecting is Ok, but reseting the parameter is not working, also cognos.Report.getReport: is not available in 8.3, how can do it ?

below the code
<button title="Show Tab 1" onclick="document.formWarpRequest.elements['p_REGION_ID'].value='1';promptButtonFinish();document.formWarpRequest.elements['p_REGION_ID'].value='';">Select 1</button>
&nbsp;
<button title="Show Tab 2" onclick="document.formWarpRequest.elements['p_REGION_ID'].value='2';promptButtonFinish();">Select 2</button>
&nbsp;
<button title="Show Tab 2" onclick="clearAllValues() ;">RESET</button>


<input type="text" name="p_REGION_ID" value=""/>



<script>

function clearAllValues() {
   var oCR = cognos.Report.getReport("_THIS_");
   var aControls = oCR.prompt.getControls();
   for (var i = 0; i < aControls.length; i++) {
      aControls.clearValues();
   }
}

</script>