Monday, March 12, 2012

Run JS script from report

I have a report that shows product available for employees in the outlet
store. A person who is responsible to price product is asking me if it's
possible to enter prices in while he is looking at the report. I was
thinking to have a link on the report that will open a new window with a
simple form to enter price information and save it. Can I run JS script form
a report?
ThanksWhat you can do is use the jump to url action that opens up another web page
in another window.
This is something I used in RS 2000 when Excel rendering was slow, I don't
do this anymore but it shows you the syntax.
This causes Excel to come up with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
Notice and be careful of the single and double quotes usage.
My suggestion is to start with a report with a single textbox. Right mouse
click on text box, properties, navigation tab. Hard code the URL string to
bring up a web page. Then hard code it to bring up the appropriate web page
passing the parameter (all hard coded). Next have a simple report and have
one of your fields with this action on it (I make the text blue and
underlined). Use the expression builder to get the value of the appropriate
field into your URL string.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mark Goldin" <mgoldin@.ufandd.com> wrote in message
news:OpZw7x4%23HHA.4828@.TK2MSFTNGP04.phx.gbl...
>I have a report that shows product available for employees in the outlet
>store. A person who is responsible to price product is asking me if it's
>possible to enter prices in while he is looking at the report. I was
>thinking to have a link on the report that will open a new window with a
>simple form to enter price information and save it. Can I run JS script
>form a report?
> Thanks
>

No comments:

Post a Comment