Friday, March 30, 2012

jump to URL navigation feature

I am using the navigation/hyperlink action/jump to url feature of reporting services(Right Click ->Advanced->Navigation->Jump To Url).In my environment the url comes from the database so I use thefollowing code in the "jump to url" field: =Fields!feature_url.Value.
I want to open a new window(_blank) when I click on the link but am having difficulties. I found some code
"void(window.open('& =Fields!feature_url &','_blank'))"
but haven't yet gotten it to work. I am entering this code directly into the "jump to url" field.
Does anyone have any ideas?
I left out a bit of important info...
If I use this:
="javascript:void(window.open('http://www.google.com','_blank'))"
I will be properly directed to google, so it looks like this piece ofcode works. I'm having trouble replacing the google urlwith "=Fields!feature_url.Value"

|||Hi, I don't know how you manage to have that piece of javascript working... I copy/pasted the string you posted and it is taked as a URL literally ... so obviosly it doesn't work.
I want that the Report show itself in an IFRAME and not in a new window, but should be just changing the TARGET property in the windows.open, isn't it?
May be this is a problem with my OS... Win2003 Server.
If you could help me... I'll be grateful.
Thanks in advance,
Matías|||

To call up a javascript window link from the "Jump To URL" functionality in Reporting Services SP2 Hotfix 1 applied, use:
="javascript:void(window.open('" & Fields!feature_url &"','_blank'))"
If you want it to direct to an iframe, make your iframe on your page:
<iframe name="MyFrameName"></iframe>
and make your link:
="javascript:void(window.open('" & Fields!feature_url &"','MyFrameName'))"
This works in IE6, but I can't say for the other browsers.

|||

The reportviewer control has an attribute named "HyperlinkTarget"

so Yo can have somthing like:

<rsweb:ReportViewerID="reportViewer"runat="server"Font-Names="Verdana"Font-Size="8pt"

Width="100%"Height="800px"HyperlinkTarget="_blank">

</rsweb:ReportViewer>

No comments:

Post a Comment