C1 report field hyperlink for open in new browser window?

Posted by: darkmove on 10 September 2017, 11:44 am EST

  • Posted 10 September 2017, 11:44 am EST

    Hi all,

    I have a question:

    I have a report field which is a hyperlink field (filled a www adress under property "Link Target").

    This hyperlink opens when click on it the web-page, but in same browser window.

    Is it possible to tell C1 report that the target should open in a new browser window (like target="_blank" in a href command)?

    Any hint is highly appreciated.

    Thanks & Regards,
    Oliver
  • Replied 10 September 2017, 11:44 am EST

    Hello Oliver,

    I have escalated it to the developer for review and would update you as soon as I hear anything from him.

    Regards
    Ashish
  • Replied 10 September 2017, 11:44 am EST

    Hello Ashish,

    thanks for your reply.
    Appreciate your further notice.

    Regards,
    Oliver
  • Replied 10 September 2017, 11:44 am EST

    Hello Oliver,

    In order to achieve the desired requirement, you may set the LinkTarget property in code as follow:

    report.Sections["Detail"].Fields["QuantityPerUnitCtl"].LinkTarget = "javascript:openPage('http://google.com/')";


    and can define this openPage method in javascript as below:

    <script type="text/javascript">
    function openPage(url) {
    window.open(url, "mywindow");
    }
    </script>


    Regards
    Ashish
  • Replied 10 September 2017, 11:44 am EST

    Hello Ashish,

    this works. Great job.
    Thank you very, very much for your support!

    Regards,
    Oliver
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels