Jump to content

BIRT Developer Center Download


Photo
- - - - -

remove underline for label when hyperlink is added


  • Please log in to reply
1 reply to this topic

#1 bcmp

bcmp

    Advanced Member

  • Members
  • PipPipPip
  • 90 posts

Posted 15 August 2017 - 07:58 AM

When label is hyperlinked to internal bookmark to drill through, it creates an underline in the label content. 

How to remove the underline from the label element when hyperlink is added



#2 Clement Wong

Clement Wong

    Senior Member

  • BIRT Experts
  • 1204 posts

Posted 25 August 2017 - 03:12 PM

One method is to use a HTML Report Item and change the link styles for all hyperlink tags:

<SCRIPT language='JavaScript'>
    var hyperlinks = document.getElementsByTagName('A');
    for (var i = 0; i < hyperlinks.length; i++) {
        var hyperlink = hyperlinks[i];
        var hyperlinkParent = hyperlink.parentNode;
        var parentStyle;
        if (window.getComputedStyle) {
            parentStyle = window.getComputedStyle(hyperlinkParent,null);
        } else {
            parentStyle = hyperlinkParent.currentStyle;
        }
        hyperlink.style.color = parentStyle.color;
        hyperlink.style.textDecoration = parentStyle.textDecoration;
    }
</SCRIPT>

It can be customized to target specific links.


Clement Wong
Principal Analytics Architect

OpenText Corporation
http://www.actuate.com | http://www.opentext.com