Open report link URL in new blank window
I have dynamic links in my report and when the link is clicked I want it to open in target="_blank"
.
I have tried the following, but I must be missing a single or double quote somewhere because I am having no luck. The parameters may be throwing me off. For example, I tried these:
="javascript:void(window.open('http://server/folder/filename.aspx?ds='& Parameters!UserName.Value & '&bu=' & Fields!Business_Unit.Value & '&in=' & Fields!Item_No.Value,'_blank'))"
And:
="http://server/folder/filename.aspx?ds="& Parame开发者_如何学Pythonters!UserName.Value & "&bu="& Fields!Business_Unit.Value & "&in=" & Fields!Item_No.Value &rc:LinkTarget=_blank
Any suggestions?
Try this:
="javascript:void(window.open('http://server/folder/filename.aspx?ds=" & Parameters!UserName.Value & "&bu=" & Fields!Business_Unit.Value & "&in=" & Fields!Item_No.Value & "','_blank'))"
Use below script in Jump to URL box.
="javascript:void(window.open('http://servername/ReportServer/Pages/
ReportViewer.aspx?/TestFolder/TestReportName&rs:Command=Render&Parameter1=" &
Parameters!Date1.Value & "&Paramerter2=" & Parameters!dayname.Value &
"&Parameter3=" & Fields!Booknumber.Value & "&Parameter4=" &
Fields!TopicOrderby.Value & "','_blank'))"
Please double check servername
, reportname
, parameternames
(case sensitive).
Try this on report access URL
&rc:LinkTarget=_blank
And the option on your report field must look something like ="http://yourURL.com"
.
you need to either use window.open, or target
or
<a href="http://..." target="_blank" />
javascript:void(window.open('http://...'));
Not both. If you are building your URL, then build it before injecting it into the document.
This worked for me:
="javascript:void window.open(" &"'" & Globals!ReportServerUrl & "/Pages/ReportViewer.aspx?" & Globals!ReportFolder & "/SubReportWithMemberInfoUsedByWaiverFinance&rc:Parameters=False&RepParameterSet=50,>64,E," & Fields!YYYYMM.Value & "','_blank')"
="javascript:void window.open(" &"'" & Globals!ReportServerUrl & "/Pages/ReportViewer.aspx?" & Globals!ReportFolder & "/SubReportWithMemberInfoUsedByWaiverFinance&rc:Parameters=False&RepParameterSet=50,>64,E," & Fields!YYYYMM.Value & "','_blank')"
Works well I tested in SSRS 2014 ( That extra parenthesis between VOID and WINDOW is not needed.
set
HyperlinkTarget="_blank"
of <rsweb:ReportViewer>
element in your asp page
more description
精彩评论