How to use "Jump to URL" hyperlink Action to open a new window

  • I have been searching all day and not making any headway, hopefully someone can help ...

    My requirement is to show a drill-down report of detail records for each summary row in a table. When we include the drill-down as a subreport (hidden but toggled on the first column), the report performance goes from 5 seconds to 3 minutes. This performance is unacceptable so I am trying a different way using the Navigation Hyperlink action. When I use the "jump to report" option it works great but only displays the detail report in the same window. So I am trying to use the "Jump to URL" action to open the details in a separate window.

    I created my url: ="http://servername/ReportServer/Pages/ReportViewer.aspx?/Reporting/Work+Details&EndDt="+Parameters!EndDt.Value+"&tkId="+Fields!tkinit.Value and it opens us the detail report just fine in the same window. I have tried to add target="_blank" or use "a href" syntax as well as "window.open" to force the URL into a new window with no luck.

    Is there an undocumented setting or command somewhere to control this behavior? Any other ideas?

    Thanks in advance, Jim

  • Hi Jim

    Not sure if this fully resolves your problem, but you maybe able to adapt the code.

    I've used the following to create a 'pop-up' window in a Reporting Services report;

    The code is entered as an expression in the 'Jump to URL' properties;

    -Matt

    Seem to have problems copying the code it should read (!remove the underscore from javascript)

    ="java_script:void(window.open('http://servername/REPORTSERVER?%ReportName&rs:Command=Render&rc:Parameters=false&rc:Toolbar=false', 'popup','width=300,height=400,location=no,toolbar=no,resizable=1'))"

  • Really nice solution Matt.

    I think that this is one of the shortcomings of SSRS, that fact that you can't, to my knowledge, use target="" in the Jump to URL.

  • Matt,

    Thanks for the reply, it has helped tremendously as I was hoping to do the extra window as a popup in the future any way. I am now able to create the popup and have it run the report. Here is my new expression:

    ="java_script:void(window.open('http://servername/ReportServer?/FolderName/ReportName&tkId=Fields!tkinit.Value&rs:Command=Render&rc:Parameters=false&rc:Toolbar=false', 'popup','width=800,height=600,location=no,toolbar=no,resizable=1'))"

    (ignore the ";" after the ReportName&, that is not in the URL)

    Unfortunately, the report renders blank. I updated my syntax to remove the "rc:Parameters=false&rc:Toolbar=false" to be able to see the toolbar and prompts. What happens is the new report is passed name of the field I am clicking on and not the value, i.e. parameter box for tkId shows "Fields!tkinit.Value" instead of "50672".

    Is there some additional syntax I am missing? I tried removing "&rc:Parameters=false" or using "rc:Parameters=true" and moving the "&tkId= ..." to after the render command, but no luck with either.

    Thanks for your help.

    Jim

  • I think you just need to do concatenation to get the value. Something like this:

    ="java_script:void(window.open('http://servername/ReportServer?/FolderName/ReportName&;tkId=" & Fields!tkinit.Value & "&rs:Command=Render&rc:Parameters=false&rc:Toolbar=false', 'popup','width=800,height=600,location=no,toolbar=no,resizable=1'))"

    I didn't put it in a code block because I bolded the part I changed and the bolding did not apply within the code block. It may not be perfect, but I think this should point you in the right direction.

  • Jack,

    Thanks for the second (or third) set of eyes. Indeed, it works great now using the value as a concatenated string. I am not sure why I didn't try that, but a simple concatenation (using + instead of &) and now I get the results.

    Thanks again for your help.

    Jim

Viewing 6 posts - 1 through 5 (of 5 total)

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