| |

Window.open() Links not Functional on an SSRS Report Displayed in a jQueryUI Dialog

Overview

This week I had a use case requiring that I display an SSRS report in a jQueryUI dialog, but have certain links on the SSRS report open in a new tab/window. Using JavaScript’s window.open() method works in most browsers, but I had a complicating factor that caused it not to work in Internet Explorer 11.

A jQueryUI dialog containing an SSRS report

Troubleshooting

If the parent page displays in IE11 document mode, this mode will also be inherited by the iframe in the dialog (modal) pop-up, such that the SSRS report viewer also renders in IE11 document mode — instead of the document mode defined for SSRS reports if rendered directly. In my environment, this is IE5 to ensure that the report parameters and toolbar buttons function correctly in IE11, which most of users still use as their primary browser.

Prior to displaying the impacted SSRS report in a dialog pop-up, I had configured my site to launch it in a separate tab/window from the report server (using the report server URL access approach described here). For the embedded report links that I wanted to open in a new tab/window, I set the link’s action (technically, the action of the tablix cell or placeholder, depending on your design) to “Go to URL” and used the typically-recommended expression window.open(url, ‘_blank’).

="javascript:void(window.open('"+Parameters!Link1Url.Value+Trim(Str(Paramaters!ItemId.Value))+"','_blank'))"

This works great in both IE11 and Chrome. When I changed my internal site to launch the SSRS report in the jQueryUI dialog, these links continued to open in a new tab/window in Chrome, but when clicked in IE11, nothing happened — and no Javascript errors appeared in the developer tools console. Perplexed, I then tried several variants of javascript:window.open() with different options, including trying to open the links in their own modal pop-up on top of the existing jQuery dialog.

Resolution / Workaround

Ultimately, I had to remove the javascript:window.open() from the URLs entirely, and revert to opening the links in the same window. Fortunately, IE11 will correctly open them in the parent window without issue. To somewhat offset the usability issue with these links now opening in the same tab/window instead of a new one, I added a brief instruction to their tooltip property stating to Ctrl+click to open in a new tab/window.

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.