none
Open url in a new window

    Question

  • hi, I got a problem with reporting services 2005.

    I have to create a link activated by clicking on an image.

    In the image navigation properties I inserted the link in "jump to url"  but the problem is that no new window is opened, the url is opened in the initial report page.
    I tried to use jscript this way:

    javascript:window.open("myurl","", "scrollbars=yes,width=800,height=600,left=0,top=0");

    but in this case the url opens in a new window but a blank page is shown in the report page.

    How can I solve this problem and open the url in a new window without changing the report page?

    Thanks in advance and sorry for my english

    Wednesday, October 25, 2006 4:22 PM

Answers

  • ="javascript:void window.open('http://yoururl&rs:Command=Render.....and whatever else you need "')"

    Wednesday, October 25, 2006 5:58 PM

All replies

  • ="javascript:void window.open('http://yoururl&rs:Command=Render.....and whatever else you need "')"

    Wednesday, October 25, 2006 5:58 PM
  • ok it works!

    Thanks a lot for your help

    Thursday, October 26, 2006 10:39 AM
  • I made the Jump to URL expression as:

    =void window.open('http://barn/apx/PortfolioDetail.aspx?linkfield=" & Fields!APX_PortfolioID.Value & "', '_blank')"

    The above expression opens a new window correctly when the source report is run from the SSRS ReportServer or Reports (ReportsManager) pages.  So far so good.  But if the source report is first opened in an HTML frame via the following link, then clicking on the above link (on the source report) does nothing at all (just gives a click sound from IE):

    <a href="http://brat/ReportServer/Pages/ReportViewer.aspx?%2fAccount+Profile&rs:Command=Render&rc:Zoom=100" target=apcontent><u>Accounts</u></a>

    Very perplexing (at least to me).  Any ideas on why this could be happening would be greatly appreciated.  TIA.

    Tuesday, December 26, 2006 8:57 PM
  • Adding more info to above.  On my development machine (XP/SP2), the link is working from a frame also. 

    So, the link is not working on the production intranet site for some reason.  The dev platform is 2005 Reporting Services with the reporting server databases on sql server 2005 on XP/SP2.  The production platform is 2005 Reporting Services but the reporting server databases are on sql server 2000 on windows 2003 server.

    The data source for the report is identical for both the platform (stored proc on sql 2000).  Any ideas?  TIA.

    Tuesday, December 26, 2006 9:28 PM
  •  MaryAnn80 wrote:

    ok it works!

    Thanks a lot for your help

    Hi, mate, how did you make it work? I used the same code but the link disappeared when I use '=javascript'. I am using SQL 2005 reporting services. I just want make UserID as an URL and when I click it, it open a new window, it just doesn't work.

    Thursday, January 04, 2007 8:19 PM
  • Yeahhh!I got it working now.Thanks folks!
    Monday, January 08, 2007 2:30 PM
  • I have a piece of JavaScript for Jump to URL like the following:

    =void window.open('MyPage.aspx?ContactId=" + CStr(Fields!ContactId.Value) + "','_blank','location=yes,toolbar=yes,scrollbars=yes,resizable=yes,left=100,top=100,height=600,width=1000')"

    The SSRS report is hosted by a Report Viewer control in a Web page (like MyPage.aspx).

    The Web page is under a sub-folder of the application root (like http://MyApp/Module1).

    The link works fine when the page shows up for the first time (http://MyApp/Module1/MyPage.aspx and the report shows up as expected).

    However, if the Refresh button of the Report Viewer is pressed, the access path between the application root and page is chopped off (and I will have an error 404 message says Requested URL: /MyApp/MyPage.aspx resource can not be found.

    Everything works fine if I change the JavaScript to: 

    =void window.open('http://MyServer/MyApp/Module1/MyPage.aspx?ContactId=" + CStr(Fields!ContactId.Value) + "','_blank','location=yes,toolbar=yes,scrollbars=yes,resizable=yes,left=100,top=100,height=600,width=1000')"

    The problem with hard coding the full access path is that I have to modify the JavaScript every time when I roll a report from development to production.

     

    I’ve tried a variety of access path strings to make the JavaScript server independent (such as ../Module1/MyPage.aspx, and so on) and have no luck so far.

     

    Can anyone help?

     

    Thanks

    Thursday, January 11, 2007 7:15 PM
  •  

    I know it's a while late - but I thought it worth posting something here which I have struggled with for some time in RS.

     

    I have a site with 2 frames - left (named "Menu") for the... you guessed it... Menu.  and the right frame called "Body".

     

    I was using several dynamic menu items to open up RS reports.

     

    I went to use this, as per many examples, and it did not work.  It just clicked with no action (or with Friendly Error Messages turned on it came up with an error screen with the java<removethis>script in the address bar.

     

     ="java<removethis>script:void(window.open('" + Trim(Fields!MY_URL.Value) + "','_blank', 'location=no,toolbar=no,left=100,top=100,height=600,width=800'))"

     

    I figured out after much trial and error that because everything in RS has a target of _top it was causing problems in a frameset.  So, the solution which I came up with, and have implemented is as follows:

     

    In the left menu I have added &rc:LinkTarget=Body to the end of all the calls to the report (they populate in the Body frame).  Then I use the above javascript for all URL's, and it opens them in a blank window as required.

     

    Hope this may help someone else who struggles with this one.

    Cheers,

    AndyCJ

    Monday, September 24, 2007 4:12 AM
  • Hi

     

    Did you get this working as I am faced with the same problem where my link works fine in reports manager/ report viewer but it does not work when my report is rendered within a html frame.  When I click on the link nothing happens.

    Thanks your help will be much appreciated.

     

    I have managed to use the above solution proposed by Andy.  Now it does open the page however it opens up two windows one with page cannot be displayed and one with the correct information.  Any ideas as to why it is showing up two windows?

     

     

     

     

    Friday, January 23, 2009 11:41 AM
  • i changed my link as =javascript:void window.open('http://barn/apx/PortfolioDetail.aspx?linkfield=" & Fields!APX_PortfolioID.Value & "', '_blank')" 
    ,its opening link in new window but ommiting "/" slashes from the path which is evaluated through a report variable, can somebody help me in this, thanks in advance.

    ubaid
     
    Wednesday, June 03, 2009 3:54 PM
  • Hi did you get this issue sorted as I'm too getting 2 windows opening.

    Any help please.
    Friday, January 15, 2010 9:11 AM