Friday, March 23, 2012

Please help

Hi,
How can i use a java script function in sql reporting services.
I have a textbox - which i want to make as a hyperlink and when the user
clicks on it - it has to open another report or say url in another browser.
i am usin
<hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
but it doesnt work . Can you please help me how to do this ?
Thanks
RPDon't be doing this by hand. Use RS capabilities. For the textbox do a right
mouse click, properties, advanced, navigation, jump to URL.
Then put in this for a report with parameters:
Here is an example of a Jump to URL link I use. 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'))"
For a website put in this:
="javascript:void(window.open('http://www.google.com','_blank'))"
Note that you have to have SP1 or SP2 installed. This functionality was
added in SP1.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> Hi,
> How can i use a java script function in sql reporting services.
> I have a textbox - which i want to make as a hyperlink and when the user
> clicks on it - it has to open another report or say url in another
> browser.
> i am using
> <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> but it doesnt work . Can you please help me how to do this ?
> Thanks
> RP|||Bruce,
I didnt do this by hand. I rt clicked on the textbox, properties - advanced
- navigation
jump to url.
The funny thing is :
if i give the
="javascript:void(window.open('http://www.google.com','_blank'))"
and click on the link, i get 'page cannont be displayed' with
"javascript:void(window.open('http://www.google.com','_blank'))"
in the url.
click on that - will open a new window.
2. if i access the report from localhost\reports\reportname - this is the
situation
but if i access the report from localhost\reportserver\reportname - it works
absolutely fine.
what is the diff. between reports and reportserver ?
Thanks
"Bruce L-C [MVP]" wrote:
> Don't be doing this by hand. Use RS capabilities. For the textbox do a right
> mouse click, properties, advanced, navigation, jump to URL.
> Then put in this for a report with parameters:
> Here is an example of a Jump to URL link I use. 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'))"
> For a website put in this:
> ="javascript:void(window.open('http://www.google.com','_blank'))"
> Note that you have to have SP1 or SP2 installed. This functionality was
> added in SP1.
>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> > Hi,
> > How can i use a java script function in sql reporting services.
> > I have a textbox - which i want to make as a hyperlink and when the user
> > clicks on it - it has to open another report or say url in another
> > browser.
> > i am using
> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> > but it doesnt work . Can you please help me how to do this ?
> > Thanks
> > RP
>
>|||I have a little test report that has what looks exactly the same to me.
= "javascript:void(window.open('http://www.google.com','_blank'))"
It works regardless of how the report is pulled up (I did it both ways:
reports and reportserver).
Don't know what to tell you, it works for me (I am on SP2).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"RP" <RP@.discussions.microsoft.com> wrote in message
news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> Bruce,
> I didnt do this by hand. I rt clicked on the textbox, properties -
> advanced
> - navigation
> jump to url.
> The funny thing is :
> if i give the
> ="javascript:void(window.open('http://www.google.com','_blank'))"
> and click on the link, i get 'page cannont be displayed' with
> "javascript:void(window.open('http://www.google.com','_blank'))"
> in the url.
> click on that - will open a new window.
> 2. if i access the report from localhost\reports\reportname - this is the
> situation
> but if i access the report from localhost\reportserver\reportname - it
> works
> absolutely fine.
> what is the diff. between reports and reportserver ?
> Thanks
> "Bruce L-C [MVP]" wrote:
>> Don't be doing this by hand. Use RS capabilities. For the textbox do a
>> right
>> mouse click, properties, advanced, navigation, jump to URL.
>> Then put in this for a report with parameters:
>> Here is an example of a Jump to URL link I use. 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'))"
>> For a website put in this:
>> ="javascript:void(window.open('http://www.google.com','_blank'))"
>> Note that you have to have SP1 or SP2 installed. This functionality was
>> added in SP1.
>>
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "RP" <RP@.discussions.microsoft.com> wrote in message
>> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
>> > Hi,
>> > How can i use a java script function in sql reporting services.
>> > I have a textbox - which i want to make as a hyperlink and when the
>> > user
>> > clicks on it - it has to open another report or say url in another
>> > browser.
>> > i am using
>> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
>> > but it doesnt work . Can you please help me how to do this ?
>> > Thanks
>> > RP
>>|||Bruce,
Can you pls post the code of your sample report once. my javascript looks
exactly the same. unfortunately it works if i say reportserver instead of
report. is there anyother way to check?
Thanks
RP
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. 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'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>|||oh b.t.w,
even i have SP2
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. 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'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>|||bruce -
got it - figured it myself.
"Bruce L-C [MVP]" wrote:
> I have a little test report that has what looks exactly the same to me.
> = "javascript:void(window.open('http://www.google.com','_blank'))"
> It works regardless of how the report is pulled up (I did it both ways:
> reports and reportserver).
> Don't know what to tell you, it works for me (I am on SP2).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "RP" <RP@.discussions.microsoft.com> wrote in message
> news:893EB9DB-C59F-4FBD-9E0F-DDB2B17E3FB7@.microsoft.com...
> > Bruce,
> > I didnt do this by hand. I rt clicked on the textbox, properties -
> > advanced
> > - navigation
> > jump to url.
> > The funny thing is :
> > if i give the
> > ="javascript:void(window.open('http://www.google.com','_blank'))"
> > and click on the link, i get 'page cannont be displayed' with
> > "javascript:void(window.open('http://www.google.com','_blank'))"
> > in the url.
> > click on that - will open a new window.
> >
> > 2. if i access the report from localhost\reports\reportname - this is the
> > situation
> > but if i access the report from localhost\reportserver\reportname - it
> > works
> > absolutely fine.
> >
> > what is the diff. between reports and reportserver ?
> > Thanks
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Don't be doing this by hand. Use RS capabilities. For the textbox do a
> >> right
> >> mouse click, properties, advanced, navigation, jump to URL.
> >>
> >> Then put in this for a report with parameters:
> >> Here is an example of a Jump to URL link I use. 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'))"
> >>
> >> For a website put in this:
> >>
> >> ="javascript:void(window.open('http://www.google.com','_blank'))"
> >>
> >> Note that you have to have SP1 or SP2 installed. This functionality was
> >> added in SP1.
> >>
> >>
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >>
> >> "RP" <RP@.discussions.microsoft.com> wrote in message
> >> news:CD453D6F-085D-4EFB-94B1-D43A6D6D677A@.microsoft.com...
> >> > Hi,
> >> > How can i use a java script function in sql reporting services.
> >> > I have a textbox - which i want to make as a hyperlink and when the
> >> > user
> >> > clicks on it - it has to open another report or say url in another
> >> > browser.
> >> > i am using
> >> > <hyperlink>="javascript:window.open('http://www.google.com',_blank)"</hyperlink>
> >> > but it doesnt work . Can you please help me how to do this ?
> >> > Thanks
> >> > RP
> >>
> >>
> >>
>
>

No comments:

Post a Comment