Opening SubReport with JavaScript

  • I have a slightly weird situation with a subreport. We have live and failover Reporting Servers and the reports are replicated across both of them. The problem is that for failover system a JavaScript string to open a subreport works as it should but on the live system the string doesn't open the report but goes to the home page of the report server.

    ="void(window.open('http://FailoverServer/Reportserver?%2fOuterFolder%2fInner+Folder%2fSubReports/The+SubReport+Name&rs:Command=Render&SubjectId=" & Fields!SubjectID.Value & "','_blank'))"

    The script above is the one that works and that below doesn't. The parts I've changed for obfuscation purposes, I've highlighted in bold.

    ="void(window.open('http://LiveServer/MyCompanyReportWorld?%2fOuterFolder%2fInner+Folder%2fSubReports/The+SubReport+Name&rs:Command=Render&SubjectId="&Fields!SubjectID.Value & "','_blank'))"

    To get the subreport to open on live I have to use the script below.

    ="void(window.open('http://LiveServer/MyCompanyReportWorld/Pages/Report.aspx?ItemPath=%2fOuterFolder%2fInner+Folder%2fSubReports/The+SubReport+Name&rs:Command=Render&SubjectId="&Fields!SubjectID.Value & "','_blank'))"

    The above string will open the report but won't pass the parameter. I've had a good look over t'interweb (as they say in my part of the world') and everything appears to be correct on all three strings. This leads me to think it's a settings problem, can anybody help?

    Neil


    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    —Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply