Wednesday, November 27, 2013

SSRS 2008 - Action - Go to URL in a new window. Pass parameters. Handle Empty spaces in parameter values.

If you choose go to report, you cannot open the report in a new window.

You must select Go to URL and click the Fx button to enter an expression.
You will use SQL to write javascript that will generate the correct link when clicked on from the SSRS report

Points to note

  • Click on the SSRS report you want, and get the URL in the address bar. The only part you need is the actual report name after the first ? to the end of the report name
  • That will go in the space for "MyReportName"
  • Use Reportserver, not Reports
This code is entered into the Fx box.


="javascript:void(window.open('http://gpsql/Reportserver?MyReportName&FiltDate="+ Fields!DATERECD.Value+"&FiltRct="+replace(Fields!MOPRCTNM.Value," ","+") +"'))"

When clicked, it should open a new window and go to this link

http://gpsql/ReportServer/Pages/ReportViewer.aspx?MyReportName&FiltDate=11/1/2013&FiltRct=MR02554++++++++++++++

No comments:

Post a Comment