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

ISSUE!---- Java script to pass parameter from one report to other

Started by raj.kanag.s, 20 Apr 2012 10:22:48 AM

Previous topic - Next topic

raj.kanag.s

Hi Guys,
         I am using a Javascript to pass parameter from one report to other. It looks like parameter is being passed to the other report (I kept "paramdisplay" in the second report to check this) but the actual report is coming as blank eventhough there is data corresponding to the parameter value.

Below is the script:

********* ********* **************** *****************
<script language=javascript>

function showDetail()
{
var link = event.srcElement;
var sProductType = link.productLine;
var cell = link.parentElement.parentElement;
var iframe = (cell.getElementsByTagName("iframe").length > 0) ? (cell.getElementsByTagName("iframe")[0]) :(null);

if(link.innerText == "Hide Details")
{
link.innerText = "Show Details";
if(iframe != null)
{
iframe.style.display="none";
}
}
else
{
link.innerText = "Hide Details";
if(iframe == null)
{
//Set up the IFrame
iframe = document.createElement("iframe");
iframe.style.height="200px";
iframe.style.width="500px";
iframe.frameBorder="0";
iframe.scrolling="no";
//Create a URL
var src = "https://devbicrp.jnj.com:443/cognos10crp/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder%5b%40name%3d%27CORPORATE%27%5d%2ffolder%5b%40name%3d%27HRA%27%5d%2ffolder%5b%40name%3d%27Reports%27%5d%2ffolder%5b%40name%3d%27Development%27%5d%2ffolder%5b%40name%3d%27Organization%20Reporting%27%5d%2freport%5b%40name%3d%272%27%5d&ui.name=2&run.outputFormat=&run.prompt=true";
src += "?b_action=cognosViewer";
//src += "&ui.action=run";
src += "&cv.toolbar=false";
src += "&cv.header=false";
//src += "ui.object=%2ffolder%5b%40name%3d%27My%20Folders%27%5d%2ffolder%5b%40name%3d%27HR%20Integration%27%5d%2ffolder%5b%40name%3d%27Org.%20Reporting%27%5d%2freport%5b%40name%3d%27DETAIL%27%5d";
src += "&run.prompt=false";
src += "&p_DEP=";
src += escape(sProductType);
//set the IFrame URL
iframe.src = src;
//Add the IFrame to the footer
cell.appendChild(iframe);

}
iframe.style.display = "";
}

}
</script>
***************************** ************** **************

Thanks,
Raj

Lynn


raj.kanag.s

Lynn,
         We wanted to show like as in attachment.

Thanks,
Raj

pricter

In the document in the first src puts only the cognos location
var src = "http://rmvmsc84/cognos8/cgi-bin/cognosisapi.dll";
but you use the whole path
Did you try to put only the above
var src = "https://devbicrp.jnj.com:443/cognos10crp/cgi-bin/cognosisapi.dll"
and uncomment the path