0

Hi I have been using SSRS for 10 years now but have not had to use the Go to URL Action method to pass through a SSRS report and parameters for a while (2008R2). So the concepts could have changed etc.

My full expression was based on various post like this one here and the question here but is not working.

My full expression is

="javascript:void(window.open(‘http://MyServer/ReportServer/Pages/ReportViewer.aspx?%2fMyFolderPath%2fMyReport&rs:Command=Render&DocEntry="& Fields!GrnDocEntry.Value & "&DocLineNum="& Fields!LineNum.Value &"&rc:Toolbar=false', null, 'width=795, height=490, status=no, toolbar=no, menubar=no, location=no'))"

of course I am working from home so had no one spot any typo for me so I have tried a simpler version of it as

="javascript:void window.open (‘https://stackoverflow.com/questions/18003013/open-ssrs-url-in-new-window','_blank','resizeable=1,toolbar=0,status=0,menu=0,top=20,left=20,width=740,height=730')"

however neither are working and it is driving me nuts, so I have two questions

  1. Is this still possible with modern browsers? (just checking the obvious, if it is not possible is there a new workaround?)
  2. Can any one advise on the create JavaScript method

Update If I try to open with a right click on the link I get about:blank#blocked in the new window. Is this a security setting local to my client?

I can use the "Go to Report" function but it opens in the same window tab and when I return to the main report all the multi-parameters are reset to default, which will be frustrating for the users

Ian W
  • 385
  • 2
  • 10
  • 30
  • Have you tried it without all the windows size properties just to keep it simple. I use this simple method and it always works. NOTE: This will not work from within Visual Studio or Report Builder, only when the report is open in a browser. Also, as a side note, if you open a report via the "Go to report" method, you can use the "back" button next to the zoom control to take you back to the parent report, this will preserve the content bit I admit it'a too easy to use the browser's back button by mistake/habit. – Alan Schofield Mar 23 '20 at 12:16
  • Ok I will simplify again (I just tested the back button but agree with you it is easy to use the browser back button). I am aware of the testing limitations but it is a good point to make. Do you have any browser settings changed when you use this? – Ian W Mar 23 '20 at 12:23
  • No, no browser settings changed. I often get the URL from a database so I just check if the URL is empty but other than that I do nothing special. Here is the jyperlink expression I used in a report a few days ago. `= "javascript:void(window.open('" & IIF(LEN(TRIM(Fields!URL.Value)) > 0 , Fields!URL.Value , "") & "','_blank'))"` As you can see it really does nothing and would return something like `javascript:void(window.open('https://stackoverflow.com','_blank'))` – Alan Schofield Mar 23 '20 at 12:35
  • Thank you @AlanSchofield that worked for `javascript:void(window.open('https://stackoverflow.com','_blank'))` .If you put it in answers I will mark it correct. I will now test building with parameters – Ian W Mar 25 '20 at 08:42

1 Answers1

1

I often get the URL from a database so I just check if the URL is empty but other than that I do nothing special. Here is the hyperlink expression I used in a report a few days ago.

= "javascript:void(window.open('" & IIF(LEN(TRIM(Fields!URL.Value)) > 0 , Fields!URL.Value , "") & "','_blank'))" 

As you can see it really does nothing and would return something like

javascript:void(window.open('https://stackoverflow.com','_blank')) 
Alan Schofield
  • 19,839
  • 3
  • 22
  • 35