Friday, February 24, 2012

Hyperlink Target in Same Frame

I'm having trouble creating a hyperlink that opens the page in the same frame (_self). I have a report being displayed in a frame, and want a hyperlink to stay in the same frame. I've read all about opening a new window, etc., etc., but the techniques I've read about don't work for the "_self" target.

I've tried appending the "&rc:LinkTarget=_self" to the URL, but that doesn't work. I've also tried the javascrippt options but they don't work either. They work fine for opening a new window, but not for staying in the same frame.

When I look at the source code generated for a hyperlink in a report page, it specifically spells-out "target=_top" in the resultant code, even though I'm not specifying that anywhere. If I could only suppress that, then it might work and stay in the same frame.

Can anyone help here? Thanks.

Did you happen to solve this issue? I was just trying to do the same thing and I'm not getting anywhere.

Thanks,

Derek

|||

Derek,
I had to add the target parameter in the report control on the web page:
<rsweb:ReportViewer ID="ReportViewer1" runat="server" ProcessingMode="Remote" PromptAreaCollapsed="True" Width="100%" Height="98%" HyperlinkTarget="_self">
Now, I'm not sure if it's still needed, but I also have this in the hyperlink in the report XML:
<Action>
<Hyperlink>="http://www.somewhere.com/Page.aspx?ID=" &amp; trim(Fields!ID.Value) &amp; "&amp;rc:LinkTarget=_self"</Hyperlink>
</Action>
This worked and now the hyperlinks in the reports stay in the same frame. Hope this helps!
Dan

No comments:

Post a Comment