问题
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"....
回答1:
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.
回答2:
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'))"
来源:https://stackoverflow.com/questions/17149244/how-to-open-url-in-ssrs-report-in-webpart-to-new-window