COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: pattr on 17 Jun 2009 06:37:42 AM

Title: Passing Tree Prompt Value htrough Javascript.
Post by: pattr on 17 Jun 2009 06:37:42 AM
Hi
I want to pass the tree prompt values from one cognos report1 to report2 through javascript/HTML.
scenario:

report 1:
HAs tree prompt value
report 2:
has another tree prompt and its selection has to be passed from report1 through javascript/html


Thanks in advance
Title: Re: Passing Tree Prompt Value htrough Javascript.
Post by: Killyblame83 on 10 Jul 2009 07:44:51 AM
hi

there are many kb documents on the ibm support site.

here how i resolved:

as u can see u have to specify the parameter name by adding '&p_name of the parameter defined in the same report'.
To add more parameters just concatenate anoter '&p_name ...'
I also added '&run.prompt=false' so the prompt doen't appear.


'<HTML>
<HEAD>
<script language="javascript">
<!--
"http://.../cognos8/cgi-bin/cognos.cgi?b_action=xts.run&m=portal/report-viewer.xts&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27MPRT%20Report%27%5d%2ffolder%5b%40name%3d%27AccessoPerCDC%27%5d%2freport%5b%40name%3d%27MPRT%20CdCdirezione_elist%27%5d&cv.ccurl=1&run.prompt=false&p_Select%20Year='+ URLEncode(ParamDisplayValue('Select Year'))+'"
-->
</script>
</HEAD>
<BODY>
</BODY>
</HTML>'

bye

K.