Friday 19 July 2013

JavaScript in SSRS Reports

JavaScript can be used in SSRS Reports to meet atypical requirements.

Note : Type the following code "Go To URL"  in Action Tab

1. Open a report in a new Tab from other report
="javascript:void(window.open('http://to be opened report URL from report Manager'))"

2. Alert Box
="javascript:void alert('Some Alert Message')"

3. Confirmation Box
="javascript:var check=confirm('Do you want to navigate to New report?'); if (check == true) {window.open('http://to be opened report URL from report Manager')}"

4. Prompt Box
="javascript:var FirstName=prompt('what is your First Name?');LastName=prompt('what is your Last Name?'); if(FirstName!='') {void alert(FirstName+','+LastName)} "

5. Using Parameters in javascript
="javascript:var check=confirm('Do you want to generate the report for the selected DateRange?"& Parameters!StartDate.Value & "-" & Parameters!EndDate.Value & "'); if (check == true) {window.open('http://to be opened report URL from report Manager','_self')}"

1 comment:

  1. Great information you have share I really like it. Thanks for sharing check it once through MSBI Online Training Hyderabad for more information on msbi courses.

    ReplyDelete