SSRS report - all hyperlinks have target of _top

mark goldin 696 Reputation points
2021-09-16T11:32:00.54+00:00

I am creating a hyperlink like this:
="<a href=""https://www.google.com"" target=""_blank"">Link</a>"
It works but I need to open it in the tab. When I inspect the element the target is set to "_top". I am also trying using this parameter:
rc:LinkTarget=_blank, but it's not helping. Any idea how to have hyperlinks opening in new tabs?

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,042 questions
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Michael Taylor 58,696 Reputation points
    2021-09-16T12:37:07.157+00:00

    Where are you putting this expression exactly? Normally to add a hyperlink you put a Textbox on the report and set the URL using the Action section. That doesn't allow you to change the link behavior. The link behavior is determined by the client. For example while in the designer it'll open a new tab but in Report Manager it'll open in the same window if I remember correctly.

    The only way I've seen to get it to open in a different tab is to use Javascript. Here's one possible approach.

    ="javascript:void(window.open('url', '_blank'))"
    

    But you should test this to make sure it works and it might only work in a web app.


  2. Joyzhao-MSFT 15,621 Reputation points
    2021-09-17T02:46:44.533+00:00

    Hi @mark goldin ,

    ="<a href=""https://www.google.com"" target=""_blank"">Link</a>"

    Now when your visitors click that link, it will open in a new window or tab (depending on which web browser they are using and how they configured that browser).
    Note that if your web page uses the "strict" DOCTYPE of XHTML 1.0 or 1.1, you will not be able to do the above and still have your page validate as correct.
    For more information,please refer to: How to Make Links Open in a New Window or Tab.
    Redirect to report viewer page in a new window.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Zolotoy 226 Reputation points
    2025-04-10T16:14:35.6866667+00:00

    I haven't been working with SSRS for quite some time. At the time I did, I was using the latest, I guess 16 or later. Try PowerBI paginated report builder. What if that one has less bugs??

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.