locked
How to open URL in new tab rather than new window in SSRS 2008 R2. RRS feed

  • Question

  • Below is my navigation URL link ..I want the drill through to open in new tab rather than new window..I believe i need to change the newwin..Can someone help me out with it..

    ="javascript:void(window.open('"+ Globals!ReportServerUrl + "?" +  Globals!ReportFolder + "%2fReportName&rs:Command=Render" +"&YQM='+escape('"+Parameters!YQM.Value.ToString() +"') +'&Status='+escape('"+Parameters!Status.Value.ToString() +"') +  '',  'newwin', 'screenX=0,left=0,screenY=0,top=0,status=1,menubar=1,resizable=1,scrollbars=1,toolbar=1,location=1'))"


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Tuesday, December 18, 2012 5:27 AM

Answers

  • Hi Sri,

    When we click a hyperlink that uses "javascript:void(window.open('URL','_blank'))", whether it open a new window or a new tab depends on the Internet Explorer Tabs settings. In IE, if we set the "When a pop-up is encountered" item to "Let Internet Explorer decide how pop-ups should open" or "Always open pop-ups in a new tab", it will open the pop-up in a new tab. In this issue, I am afraid that you have to make sure the IE doesn't select the "Always open pop-ups in a new window" option on each client machine.

    Regards,


    Mike Yin
    TechNet Community Support

    • Marked as answer by Mike Yin Sunday, December 23, 2012 2:08 PM
    Wednesday, December 19, 2012 9:16 AM

All replies

  • Hi Sri,

     

    try this expression for opening the URL in a new tab.

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

     


    - Arun Gangumalla, Please mark as helpful or answered if it resolves your issue to help others in finding solutions easily.

    Tuesday, December 18, 2012 5:51 AM
  • Hi arun,,

    I tried below syntax and it didnt work for me..

    ="javascript:void(window.open('"+ Globals!ReportServerUrl + "?" +  Globals!ReportFolder + "%2fReportName&rs:Command=Render" +"&YQM='+escape('"+Parameters!YQM.Value.ToString() +"') +'&Status='+escape('"+Parameters!Status.Value.ToString() +"') +  '',  '_blank', 'screenX=0,left=0,screenY=0,top=0,status=1,menubar=1,resizable=1,scrollbars=1,toolbar=1,location=1'))"


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Tuesday, December 18, 2012 5:58 AM
  • Hi Sri,

    This expression is working fine on test environment, please check the internet options once under tabbed settings and also assigned the url pointing to another report rather general URL. please check the same below.

    > may be you can try assigning some link directly and check out if the new tab thing is working on your browser or not, later you can check with your custom report url.

     

     


    - Arun Gangumalla, Please mark as helpful or answered if it resolves your issue to help others in finding solutions easily.

    • Proposed as answer by Sanjeewan Kumar Tuesday, December 18, 2012 7:31 AM
    • Unproposed as answer by Sri k Tuesday, December 18, 2012 8:05 AM
    Tuesday, December 18, 2012 6:21 AM
  • Arun,

    If i set the above browser settings -- Then the report opens up in new tab even before adding the "_blank" in the url ..

    Also there are many end users who will be accessing the report and i cant educate or pass on the information to all of the users to change their browser settings..

    Let me ask you this -- Will it not be possible to get the  drill through report in new tab rather than new window with out changing the browser settings?


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Tuesday, December 18, 2012 8:05 AM
  • Hi Sri,

    Seems like you didn't get the point in the screenshot which is showing up with "new window" selected rather "new tab".

    Even when "new window" option is selected, report is getting opened in the new tab.. so there is no additional setting selected over here.

     

    Did you tried options...

    >Assigning some link directly and check out if the new tab thing is working on your browser or not, later you can check with your custom report url.

    >Place the google or some other website and check out the expression on your machine whether new tab is getting reflected or not.

    > So please try debugging this way first later you can assign the full length code for the additional report to be displayed with the link .

     

    Please feel free to revert back if help needed, thank you...


    - Arun Gangumalla, Please mark as helpful or answered if it resolves your issue to help others in finding solutions easily.

    Tuesday, December 18, 2012 8:36 AM
  • Arun ,

    I believe the javascript will consider the link(javascript:void(window.open) as "Pop-up" for which you have mentioned as "let internet explorer decide how pop-up should open" ..If i change it to "Always open pop up in new window" then i am unable to get the drill through report in new tab ...Please correct me if i am wrong or heading in wrong direction..

    Thanks in advance.


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Tuesday, December 18, 2012 8:46 AM
  • Hi Sri,

    Yes ofcourse javascript code is for pop-up option only,

    i'm checking if any alternate approaches available irrespective of selection options on browser.

    found some link ... it is mentioned for window or tab... there is no much difference in the approach but may be you can try once if it works for you.

    http://www.purplefrogsystems.com/blog/2007/12/open-ssrs-report-in-a-new-window/

    Found another thread on same requirement, please have a look...

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/8d1dff86-c581-4066-b010-dca216801a98/

     

    > Also tried with other option with html tags on textbox control

    -> textbox control > create place holder > properties > Mark type > HTML and then place

    ="<a href='http://google.com' target='_blank'> Google </a>"  under Value of textbox.


    - Arun Gangumalla, Please mark as helpful or answered if it resolves your issue to help others in finding solutions easily.

    Tuesday, December 18, 2012 10:08 AM
  • I will check out the links ..Thanks for the help and effort Arun ..


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Tuesday, December 18, 2012 10:20 AM
  • Hi Sri,

    When we click a hyperlink that uses "javascript:void(window.open('URL','_blank'))", whether it open a new window or a new tab depends on the Internet Explorer Tabs settings. In IE, if we set the "When a pop-up is encountered" item to "Let Internet Explorer decide how pop-ups should open" or "Always open pop-ups in a new tab", it will open the pop-up in a new tab. In this issue, I am afraid that you have to make sure the IE doesn't select the "Always open pop-ups in a new window" option on each client machine.

    Regards,


    Mike Yin
    TechNet Community Support

    • Marked as answer by Mike Yin Sunday, December 23, 2012 2:08 PM
    Wednesday, December 19, 2012 9:16 AM
  • Thanks for the info Mike..


    Thanks, Sri The journey is what brings us happiness not the destination―Dan Millman

    Wednesday, December 19, 2012 3:17 PM
  • I have tried all the possibility to control it but it depends on Tabs settings. Even if you make it work some how on IE. Other browser will have different behaviour.
    Friday, July 19, 2013 5:37 PM
  • The journey is what brings us happiness not the destination―Dan Millman

    Yes, that's true with the journey. There is actually no destination, just the journey
    Monday, September 7, 2015 9:19 AM
  • thanx, nice script, works fine for me, SSRS 2016, opens new tab. 


    From Project Techcenter

    Tuesday, May 15, 2018 2:33 PM
  • I know this is an older post, but this worked perfectly for me so thank you Arun.
    Tuesday, July 24, 2018 7:33 PM