Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Report in New Window from Parent URL??

Status
Not open for further replies.

sconti11

Technical User
Jan 31, 2011
95
US
Ok..i have trolled the interweb, and have found varying versions of what i am attempting to do. Which is..to pass data item values within a list to a child reports prompts, and to show the child report in a new window...which is basically a window without scrollbars or toolbar!!!

Here is what I have:

Parent report with a funciton within an HTML item at the top of the page with the following code:
Code:
<script> 
function openInsertComments(id){
  var url="[URL unfurl="true"]http://server:port/cognos10/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2fpackage%5b%40name%3d%27COMMENT_TEST%27%5d%2freport%5b%40name%3d%27Comments%20Test%27%5d&ui.name=Comments%20Test&run.outputFormat=&run.prompt=false&cv.header=false&cv.toolbar=false&p_pMemberID='+id+'";[/URL]
win = window.open(url, '_blank');
  win.focus();
}
</script>

Then within my list i have another HTML item where the Source Type is set to Report Expression. Below is the code within this item:

Code:
'<input type="button" onclick="openInsertComments('+[Query].[MEMBER_ID]+')" value="Insert Comments"/>'
So what happens is the Parent report opens fine, but as soon as I click on this button within the list, i get a windows error which says the following:

Webpage error details
Message: 'A0303870500' is undefined
Line: 157
Char: 1
Code: 0
URI:
So, i want to reference the jaascript function, but it does not seem to work. If I use just the HTML Report Expression, I can pass the data item values to the child report, but it will not open in a new customized window????

Any suggesstions??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top