none
Open report link URL in new window in SSRS does not work

    Question

  • 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 to go to a URL and open an new window and ultimately pass a parameter to it. However, I am not even able to open a simple URL in a new window. This is what I have been trying for the expression:

    =javascript:void(window.open('http://www.google.ca','_blank'))

    My report is accessed in a PerformacePoint dashboard. (If I open the report directly in SharePoint and click on the link it works fine and a new window opens. The problem only exists when the report is hosted in a dashboard page.)

    When I click on it nothing happens even though it is clickable. When I hover over it, it shows javascript:void(window.open('http://www.google.ca','_blank'))

    Thanks, Ali

    Friday, July 16, 2010 10:30 PM

Answers

  • Hello,

    This issue is happening because the javascript is run from within the href rather than in an onClick event in anchor tag and the behavior of those are different when run inside iFrames.  The way to do a link like this that will work whether it is in the iFrame or not is:

    <a href="http://www.bing.com" onclick="javascript:window.open('http://www.bing.com','_blank');return false;">

     

    To be able to open a new window with a link, you will need to customize a script in onClick event.

    Thanks
    Heidi Tr - MSFT


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, March 4, 2011 8:26 PM
    Moderator

All replies

  • Hello,

    This is not expected behavior within PerformancePoint Server.  The best way to get to the bottom of this issue would be to contact Technical Support for assistance.  To open a new case, contact US Customer Service at 800-936-4900 or visit http://www.support.microsoft.com/.

    Thanks

    Heidi Tr - MSFT

     


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Wednesday, July 21, 2010 12:45 PM
    Moderator
  • Hello,

    This issue is happening because the javascript is run from within the href rather than in an onClick event in anchor tag and the behavior of those are different when run inside iFrames.  The way to do a link like this that will work whether it is in the iFrame or not is:

    <a href="http://www.bing.com" onclick="javascript:window.open('http://www.bing.com','_blank');return false;">

     

    To be able to open a new window with a link, you will need to customize a script in onClick event.

    Thanks
    Heidi Tr - MSFT


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Friday, March 4, 2011 8:26 PM
    Moderator
  • I agree this is the cause of the behavior, but has anyone successfully implmented how to customize a script in onClick event? If so, please provide steps?

    I created a frameset page with a "Report an Issue" link in the top frame and the SSRS 2008 R2 ReportViewer OOTB page on the bottom so that all of our reports have a way to contact the development team for any data issues or permissions issues without the need to update every single report.

    Now our links that used to open in new windows don't and I believe it is because of this same issue. Thanks in advance for any input/guidance!!

    Wednesday, March 30, 2011 1:18 PM
  • <

     To be able to open a new window with a link, you will need to customize a script in onClick event.

    Where? In the report?

    Thursday, December 14, 2017 7:31 PM