Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Friday, 1 September 2017

Using javascript to encode a URL with an ampersand

javascript escape function:


="javascript:void(window.open('http://xxx/reportserver?/Folder A/Report X" & "&rs:Command=Render" & "&rc:Parameters=true" & "&param1="
& replace(
Fields!description.Value, "&", "'+escape('&')+'"
)

& "'));"
 

Monday, 13 February 2017

ssrs url javascript


="Javascript:" 
    & IIF(left(Fields!Name.Value,11)="RESTRICTED-", 
        "alert('Restricted!'); ","") & IIF(Fields!Name_Alert.Value = 1, "alert('Alternate Alert!'); ","") 
    & "void(window.open('" 
    & Globals!ReportServerUrl 
    & "/Pages/ReportViewer.aspx?%2fJPD%2fPO_Dashboard%2fJuvenile_Profile&rs:Command=Render" 
    & "&rc:Parameters=true" 
    & "&Emp_Number=" 
    & Parameters!Param1.Value 
    & “&ID=" & Fields!ID.Value & "'));"



 
Courtesy of Christoper Brown at:

http://stackoverflow.com/questions/18003013/open-ssrs-url-in-new-window



=iif(

COUNT(Fields!ABC.Value)>0,

"javascript:void(window.open('http://XXX/reportserver?/my Reports/this report"
& "&rs:Command=Render"
& "&rc:Parameters=true"
& "&p1=" & Parameters!p1.Value
& "&f1=" & Fields!f1.Value
& "&f2" & Fields!f2.Value &
"'));",NOTHING)
 







URL encoding


Replace(Fields!myfield.Value,"&","' + escape('&') + '")

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6462b0f6-d784-4c7a-afe0-2813bec5770a/url-action-with-javascript-and-ssas-parameter?forum=sqlreportingservices

 





 
 
 




 

Tuesday, 2 March 2010

SSRS URL Parameters - SSRS

To pass a report parameter through to another report via a new browser:

On the Navigation tab for the report objects properties add the following javascript command to the Jump to URL expression box:
















="javascript:void(window.open('http://SERVER NAME/ReportServer/Pages/ReportViewer.aspx?%FOLDER NAME%REPORT NAME%&rs:Command=Render&PARAMETER NAME="+Fields!Pass value.Value+"'))"

For example:

="javascript:void(window.open('http://dom-pc/ReportServer/Pages/ReportViewer.aspx?%2fCAD+GIS+DB+reports%2fJobs+By+Establishment&rs:Command=Render&EstablishmentParameter="+Fields!SITE_NAME.Value+"'))"