SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help with setting LinkTarget=_blank to open URLs in new window


Help with setting LinkTarget=_blank to open URLs in new window

Author
Message
geoff5
geoff5
SSC Veteran
SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)

Group: General Forum Members
Points: 244 Visits: 543
I want to change links on one report to open in a new window. I have read enough to know that using the LinkTarget="_blank" syntax somewhere is part of the solution, but nothing I have tried is working. Can anyone help me understand where to set this option?

I have tried to put it in the URL of the report I'm working with by manually typing it after the report URL after opening the report. Even after refreshing the report with it in the URL, links still open in the same window.

I have tried to put it in the URL of the link that is in the Action property of the report item.

I don't know where else to put it, but clearly I'm not putting it in the right place for it to work.
Steven.Howes
Steven.Howes
SSC Eights!
SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)SSC Eights! (872 reputation)

Group: General Forum Members
Points: 872 Visits: 2340
To open in a new window I use this

="void(window.open('http://ServerName/ReportServer/Pages/ReportViewer.aspx?/Path/ReportName
&ParameterName=" & Parameters!ParameterNameDepartment.Value & "
&rs:Command=Render&rcTonguearameters=false&rc:Toolbar=false', 'WindowTargetname','width=1025,height=600,location=no,toolbar=no,resizable=1,scrollbars=yes,dependent=yes'))"

It should be all one line but I CRLF'd it to make it more readable. For the url I usually open the report I want to jump to and just copy & paste the URL. I added a papameter too so you can see how that part works. yOU can name the wondow too by replaceing the Window Target Name Value.

This syntax is very picky, a lot of times I have to cut my losses and start over with one that workss and slowly replace stuff until it works.
geoff5
geoff5
SSC Veteran
SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)SSC Veteran (244 reputation)

Group: General Forum Members
Points: 244 Visits: 543
Thanks, I will give this a try. For the time being I just told the customer to hold down the Ctrl key while they click. I even put that into the "tool tip" text as a reminder of the technique for opening any link in a new window. I think that will suffice for this particular situation, but before the next time this comes up, I will try to master the URL string you supplied.

Thanks again!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search