Open URL in new window not working with SQL 2008 R2
I am running SQL Server 2008 R2 Reporting Services in SharePoint 2010 integrated mode. I am trying to set the action (navigation) for a text box open a URL in a new window (for help documentation). This is what used to work in SQL 2008 SSRS: ="javascript:void(window.open(<URL of help file>,'_blank'))" I have a frame in a frameset document pointing to the SSRS ReportViewer and it seems that the expression actually is in the href attribute of the anchor tag and not the onclick event, so that the HTML appears as <a href="javascript:void(window.open(<URL of help file>,'_blank'))" > I think this should be rendered as <a href="#" onclick="javascript:void(window.open(<URL of help file>,'_blank'))" > Thoughts on how I can accomplish this in SQL 2008 R2?
March 31st, 2011 3:16pm

Hi Hokie, Can you try using the target property instead of the window.open method: <a href="Your_URL_Here" target="_blank"> Alternatively, if you use the ReportViewer web part, you have the option to set the target property for your reports. HTH.Please mark correct answers :)
Free Windows Admin Tool Kit Click here and download it now
April 1st, 2011 1:53am

Thanks for replying ice -- and I would love to use the target property. Do you know where I can find that in an SSRS report? I have a textbox and have designated a Go to URL action on it. I couldn't find where to set the target, which is why I'm using the javascript window.open call. Thanks!
April 1st, 2011 8:05am

Hi HokieInMD, In reporting services, there is no such a build-in target property, you should set this property in URL, refer to this article http://www.mssolutionhelper.com/Main/Article.aspx?Id=2 Similar thread, you could also get some help from this http://stackoverflow.com/questions/518010/how-to-control-the-target-frame-of-reporting-services-ssrs-drill-down Thanks, Challen FuPlease remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
April 6th, 2011 3:15am

Hokie... Did you ever solve this? We have similar situation except we are using an iframe. The solution provided by Challen Fu is inadequate as adding window.open to the href limits the scope of the window object and the pop-up fails in IE and Firefox... Works in Chrome though! Go figure. But what is needed is a way to code a true onclick event, and not insert into the href url as has been suggested. Just curious if you made any headway?
July 23rd, 2012 4:59pm

Yes -- I wound up using "&rc:Target=_blank" to get to the report with the drill-through actions. This tells the report viewer to open all actions in a new window, which was my desired behavior. If you want some actions to open up in new windows and other actions to not, this option won't work for you.... Snipped from Deliver User-Friendly Reports with SSRS (see Figure 5 for rc:LinkTarget values).... "If your Web application uses frames to display reports, let's say with a list of reports in a left pane and the report content in the right pane, you will need to use the rc:LinkTarget parameter to specify the name of your content frame. Otherwise, when the user clicks any embedded links in the report, the browser will redisplay the report using the whole window rather than preserving your frames for the navigation pane and the content pane." Hope that helps....
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2012 7:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics