13

I have created a report that I will embed in Sharepoint 2007 via a webpart using a report viewer. This works well and looks rather nice, however in the report I have a text field whose action is "Go To URL".

When I click on the link within the webpart the link goes to the URL but it opens the URL within the webpart. Kind of ugly. There doesnt seem to be any additional capabilities/properties of the text box in the report other than setting the URL.

How can I make the link/webpart open the URL in a new tab or window? Other than telling the user to right click the link and "Open in a new tab"....

Kixoka
  • 989
  • 4
  • 15
  • 37

2 Answers2

33

Have you tried using javascript and window.open to open a new window in the Go To URL action of the textbox? For example:

="javascript:void(window.open('http://myserver/mypath/myasppage.html', '_blank'))"

Check out this article for more info.

Chris Latta
  • 20,316
  • 4
  • 62
  • 70
Christine Penza
  • 466
  • 4
  • 5
  • 1
    Thanks! Im relatively new to creating SSRS reports so... Appreciate the feedback greatly! – Kixoka Jun 18 '13 at 12:06
12

Adding to Christine's answer, if Fields values are required, something like this can be done:

="javascript:void(window.open('https://myserver/mypath/mypage.aspx?myID=" & Fields!myID.Value & "','_blank'))"
Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188
werds
  • 157
  • 1
  • 8
  • 2
    This is a good solution, but is it possible to open this new tab without switching to it automatically? – al1en Oct 01 '18 at 08:39