We help IT Professionals succeed at work.

SSRS Subreport:  Open in New Window from Tablix

goodmanro
goodmanro asked
on
I am attempting to link to a subreport from a main report.  I have the parameters passing appropriate from report to report and the subreport is rendering correctly.

The subreport currently links from a data field within a tablix.  This approach works well, but the report will only open within the active window.  Is there a way to get this subreport to open within a new window (as one would typically do with the HTML properties of _blank or _new)?

The ideal state for my report would be that I could click on the customer name (which is in the tablix) and have the subreport open in a new window.  Thanks in advance for any help that you can provide!
Comment
Watch Question

Author

Commented:
Thanks, twol!

This was helpful, but I had to make a few adjustments for SSRS 2008.  I'll post my solution in the final comments for the thread.

Author

Commented:
In the Textbox properties of the data field, I went to the Action section.  Instead of using the "Go to report" option, I selected "Go to URL".  I then utilized the following code to open a new window (via JavaScript) and capture the parameter data that needed to be passed along to the subreport.  Please note that the link should link to the Report Server not the Report Manager.

Here is the expression that was used in the "Go to URL" section:

="javascript:void(window.open('http://localhost/ReportServer/?%2fFolder%2fSubReportName&rc:parameters=false&rs:Command=Render&HISTORYID_PASSED="+Fields!HISTORYID.Value+"&OPPORTUNITYID_PASSED="+Fields!OPPORTUNITYID.Value+"&C_BB_ATP_ID_PASSED="+Fields!C_BB_ATPID.Value+"'))"