Opening a Link in SSRS within a New Window

Update May 2018: A fellow Twitter user was kind enough to let me know the approach discussed below does still work in Chrome and Edge with SSRS 2016, but does not appear to work in Internet Explorer.

Following is the approach I use within SQL Server Reporting Services to launch a hyperlink in a new window. 

Go to the Textbox properties, then Action.  Select the 'Go to URL' radio button.  In the function (fx) window, insert the following javascript:

javascript:void(window.open('http://www.sqlchick.com','_blank'))

Because the new window functionality can't be tested from within BIDS, the report needs to be deployed before the 'Go to URL' Action can be tested. 

URLActionNewWindow.png

Update

on 2010-12-07 23:37 by Melissa Coates

Wrong Encoding For Tick Mark

Keep an eye on the single quotation mark, especially if it's been copied & pasted between applications (like Word or Notepad).  Sometimes it converts its encoding - in which case the URL Action won't work.  You won't receive an error; rather, the hyperlink just won't work.

One way to know the single quotation mark is encoded wrong is you'll see them as angled tick marks (instead of straight) within the SSRS Expression window, like follows.

URLAction_Update2.png

Another way to see it is in the web browser itself.  When you hover on the link, you can see how the tick marks are being converted to %E2%80%98 which is the problem.

URLAction_Update1.png

It's an easy fix - just delete each angled tick mark in the SSRS Expression window and type in a new tick mark.  When you do, the text will turn green.