传递参数时,在SSRS的新窗口中打开URL

时间:2014-11-12 18:50:16

标签: javascript reporting-services ssrs-2008

我正在尝试使用下面的代码在将值传递给网址时打开一个新窗口。

=“javascript:void(window.open('http://MYSite.aspx?acctcode=”& Fields!Account.Value','_ blank'))“

目前链接正在出现,但是当我点击它时,没有任何事情发生。

3 个答案:

答案 0 :(得分:1)

Requirement: I have requirement to open second report in new window by clicking
field in first report. My second report is having input parameter
which is used to filter the data in second report. For Example,
First Report Data         Second Report Data
----------------         -------------------   

DitrictID           DistrictID CityID CityName   
3                     6         2      XYZ
14                    3         1      pqr 
5                     6         3      zzz
6
I want to show first report with list of district ID and when i click on any
particular DistrictID It should supply DitrictID to second report to display
city belongs to supplied districtId (in above example clicking on DitrcitId 6
will display city XYZ and XXX in second report. Solution: ----------- To achieve this: Right click on textbox properties of districtId in first report then
Action->select 'Go to URL' -> Set expression as ="javascript:void(window.open('http://serverName/ReportServer/?%2fFolderName%2fReportName&rs:Command=Render&DistrictId=" & Field!DistrictId.Value & "','_blank'))" Replace values highlighted in Bold in above expression as per your server and
report details. This has worked for me hope this will help you too.Cheers!!

答案 1 :(得分:0)

尝试这个(表达式不完整)

="javascript:void(window.open('http://MYSite.aspx?acctcode=" & Fields!Account.Value & "', '_blank'))"   

同样,在部署到报表服务器后验证相同,它可能无法在预览中使用

答案 2 :(得分:0)

您可以使用以下代码:

 <a href="javascript:void( window.open('**url**', 'blank','scrollbars=yes, toolbar=no, width=990, height=500'));">help</a>