April 28, 2017 at 10:15 am
This works:
="void(window.open('http://Server1/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_HHQ%2fHardware+-+General%2fComputer+information+for+a+specific+computer&variable=LAPTOP1&rs:Command=Render','_blank'))"
Yes, my child report is expecting a value named "variable'. I didn't write it.
This doesn't work. I mean when I click on the link in the parent report, nothing happens:
="void(window.open('http://SERVER1/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_HHQ%2fHardware+-+General%2fComputer+information+for+a+specific+computer&variable='&Fields!Name.Value&'&rs:,'_blank'))"
I have tried several different combinations of single and double quotes, with and without &. I simply cannot make any combination. I know it's got everything to do with my lack of understanding of http, and I'm guessing that it's got to be a simple syntax error.
What am I missing?
April 28, 2017 at 10:23 am
Here's an example from one of our reports that successfully drills through to a new report in a new window...
="void(window.open('" & Globals!ReportServerUrl & "?" & Globals!ReportFolder & "/SuperEOB_V2&CheckNumber=" &
IIf(Fields!CheckNumber.Value = "Batch Only", Fields!BatchNumber.Value, Fields!CheckNumber.Value) & "','_blank'))"
Here's an article that give more details...
https://www.mssqltips.com/sqlservertip/1283/display-reporting-services-drill-through-reports-in-new-browser/
April 28, 2017 at 12:07 pm
Here's what worked:
="void(window.open('http://SERVER1/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_HHQ%2fHardware+-+General%2fComputer+information+for+a+specific+computer&rs%3aCommand=Render&variable="+Fields!Name.Value+"','_blank'))"
The differences:
Moved &rs%3aCommand=Render to BEFORE the variable and value. The %3a is new too. I have no idea what it does, but I saw another example that used it.
The section of this string that is static is enclosed in double quotes. This I got from the link that Jason included in his post.
The static & dynamic sections are joined with + instead of &. I simply didn't know any better.
April 28, 2017 at 12:34 pm
jtrask - Friday, April 28, 2017 12:07 PMHere's what worked:
="void(window.open('http://SERVER1/ReportServer/Pages/ReportViewer.aspx?%2fConfigMgr_HHQ%2fHardware+-+General%2fComputer+information+for+a+specific+computer&rs%3aCommand=Render&variable="+Fields!Name.Value+"','_blank'))"The differences:
Moved &rs%3aCommand=Render to BEFORE the variable and value. The %3a is new too. I have no idea what it does, but I saw another example that used it.The section of this string that is static is enclosed in double quotes. This I got from the link that Jason included in his post.
The static & dynamic sections are joined with + instead of &. I simply didn't know any better.
That'll work until the day comes when you migrate server or alter your folder path... If you use the built in globals, SSRS will make the necessary adjustments automatically.
April 28, 2017 at 12:44 pm
April 28, 2017 at 12:59 pm
jtrask - Friday, April 28, 2017 12:44 PMI'll make that change. I don't plan on changing servers any time soon, but it wouldn't hurt to make this portable.
It's the "any time soon" part that'll kill ya... # years from now, long after you've forgotten all about this, you'll migrate servers and all of the sudden a small hand full of reports start failing.
Plus, it's helpful if you maintain various testing environments. I can't speak for anyone else but I don't like having to maintain multiple versions of the same report for different environments. I want something that'll deploy to whatever environment I point it at w/o modification.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply