Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jhermiz
3564 Posts |
Posted - 2005-01-31 : 16:27:06
|
Here's my problem. I have a frame that opens two pages one (the header) is local and the other (the body) opening a page on another server (reporting services on another server, frame name is reports). I would like to be able to print the report in the body frame but I'm getting an access denied error when using window.parent["reports].print(). I read that this is because you can't use this to print from another domain?Is there a way I can do this using either frames or Iframes? I'm not familiar with Iframes. Any help is greatly appreciated. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2005-01-31 : 16:43:55
|
Have you tried using the contentWindow property of the IFrame?i.e.document.getElementById("<Your IFrame ID goes here>").contentWindow.print();Dustin Michaels |
 |
|
jhermiz
3564 Posts |
Posted - 2005-01-31 : 16:57:33
|
Im not using IFrames though. Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
 |
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2005-01-31 : 17:11:45
|
You may want to try that line of code to see if it works for Frames. I've only tried it with IFrames but its probably worth a shot.Dustin Michaels |
 |
|
jhermiz
3564 Posts |
Posted - 2005-01-31 : 18:38:44
|
Doesnt work I tried it :( Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
 |
|
jhermiz
3564 Posts |
Posted - 2005-02-01 : 13:08:42
|
I tried the document.getElementById("reports").contentWindow.print();but I'm getting an access denied error.Here is the code:<script language="javascript">function myprint() // allows user to print the report they are viewing { document.getElementById("reports").contentWindow.print();}</script></head> <body> <table width="100%"> <tr> <td width="61"><ahref="javascript:void();" onclick="myprint();"><img src="images/print.gif" border="0"></a></td> </tr> </table><%Response.write("<iframe name='reports'src='http://jakah-iis-2/ReportServer?%2fIMS-Reports%2f" &request("reportParam") & "&ClientID=" & request("reportClient") & "'width='1100' height='800' frameborder='0' scrolling='auto'name='report_window'>")%> Access denied error :( Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]Imperfection living for perfection -- [url]http://jhermiz.blogspot.com/[/url] |
 |
|
|
|
|