I try to open the URL from the SSRS by passing some parameters. Most of the time, it works. But, when the parameter contains "+" and "/", it will not work.
Example: when i have Fields!FAMILY.Value = "ACR+", I will get "ACR+" appear on the link. But, the only way to get this work is to have the "+" = %2B", when I change the link to "ACR%2B" the link manages to open as needed. I try to do this dumb thing by replacing the "+" with "%2B" in the code but I still get "+" passing in the created URL link...
="javascript:void(window.open('http://" & "pl-ate/ReportServer/Pages/ReportViewer.aspx?%2fProduct+Reports%2fNPI+Yield+Report&rs:Command=Render" & "&Family=" & Replace(Replace(Fields!FAMILY.Value, "+", "%2B"),"/","%2F") & "&SITE=" & Fields!SITE.Value & "&startTime=" & Format(DateAdd("m", - 3, Today), "yyyy-MM-dd") & " 00:00:00" & "'))"
And this is what i got from it:
http://pl-ate/ReportServer/Pages/ReportViewer.aspx?/Product+Reports/NPI+Yield+Report&rs:Command=Render&Family=ACRL+&SITE=DS&startTime=2024-02-16%2000:00:00
There is not much information about passing "reserved" characters (like "&" and "+" that served a meaning in URL) in parameters this - many suggested the encode/decode but nothing works because anything passed as %2B turns out as "+" at the end. Hope this is going to help someone else.
Managed to get it to work by replacing the "+" with %252B. With %252B, it is passed to the URL as "%2B". So, it changed %25 to "%" and left "2B" as "2B" ;)
ASCII character code: 25 = %, 2B = +