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

How to pass a parameter value in to script?

Started by bvk.cognoise, 11 Jun 2012 01:37:32 AM

Previous topic - Next topic

bvk.cognoise

Hi Folks,

Could you please help me how to pass a parameter value into a java script?please find below detailed information.

in my report i have a 9 prompts.if i select year in year prompt then my report output should display output according to prompt selection am using below java script in prompt page to get report output in PDF format.in prompt page i placed this java script next to submit button so that whenever user clicks on that button.it should automatically generate PDF output.

<html>
<head>
<script language="javascript">
function gotoUrl()
{var obj=document.all['OutputFormat'];
var value="PDF";
/* Below function passed the selected output format to the server */

window.onload(gCognosViewer.getRV().viewReport (value));
}
</script>

</head>

<body>
<button onclick="gotoUrl()";return false;">
Print</Button>
</body>


same script i used in report page its working fine in report page.

but in prompt page after selecting year when i click on print button again my year promt   getting refresh and prompting to select year.if i select yeaar there again its giving output perfectly.

now i want to avoid to display this year propmt twise.i tried in different methods.but unfortunately i  couldnt resolve it.

so guys could you please tel me how to pass my year parameter in to my javscript which i am using in my prompt page or could you please suggest me any other methods?


Thanks
bvk
Regards
BVK