--------------------------- Print Error --------------------------- An error occurred trying to get the current window. --------------------------- OK ---------------------------
Create a simple HTML page with a button.
In the Onclick event of the button, use the following script with the proper report server URL:
<
html
>
head
></
body
button
onClick
=
"window.showModalDialog ('http://serverName/ReportServerR2?/SimpleSelect&rc:Parameters=False&rs:ClearSession=True',null, 'dialogHeight:730px;dialogWidth:1010px');"
>Click Me</
</
Open the page in IE and Click the button.
Once the report come up fine, click on the Print icon for the report. It will immediately throw the error.
Workaround:
To use a modal dialog with SQL Server 2008 R2 report, have the modal dialog contain an IFrame containing the report.