2
votes

I'm trying to use the code below to open a new window while passing a value to the url.

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

Currently the link is appearing but when I click it nothing is happening.

3

3 Answers

2
votes
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
votes

try with this (expression was incomplete)

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

also, verify the same after deploying to the report server, it might not work in preview

0
votes

You can use the below code:

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