Styling HTML in SSRS

  • nick.edey

    SSC Veteran

    Points: 207

    Hello,

    I have a text box in an SSRS report containing a block of text with some html <a> tags embedded.  I would like
    the <a> tag links in the rendered report to not be underlined and to be the same colour as the rest of the text in
    the text box.  I have checked the option 'HTML - Interpret HTML tags as styles' and the text box and links render
    fine but they are underlined and deep blue by default.

    Is it possible to style the links as I would like, without an underline and in a specified colour?  Below is an
    example of what I'm trying to achieve using an expression in a text box, but this doesn't work.

    ="This is a SSRS text box containing text and some html anchors.  I would like the html anchors to not be
    underlined and to be the same colour as the rest of the text in this text box. Here is an example of a website
    link  <a href="http://www.bakerross.co.uk" style="color:red; text-decoration:none">Website</a> but this 
    appears blue and underlined."

    Many thanks,
    Nick

  • Sue_H

    SSC Guru

    Points: 90287

    nick.edey - Wednesday, August 22, 2018 9:32 AM

    Hello,

    I have a text box in an SSRS report containing a block of text with some html <a> tags embedded.  I would like
    the <a> tag links in the rendered report to not be underlined and to be the same colour as the rest of the text in
    the text box.  I have checked the option 'HTML - Interpret HTML tags as styles' and the text box and links render
    fine but they are underlined and deep blue by default.

    Is it possible to style the links as I would like, without an underline and in a specified colour?  Below is an
    example of what I'm trying to achieve using an expression in a text box, but this doesn't work.

    ="This is a SSRS text box containing text and some html anchors.  I would like the html anchors to not be
    underlined and to be the same colour as the rest of the text in this text box. Here is an example of a website
    link  <a href="http://www.bakerross.co.uk" style="color:red; text-decoration:none">Website</a> but this 
    appears blue and underlined."

    Many thanks,
    Nick

    Refer to the Supported HTML Tags section in the following document:
    Importing HTML into a Report (Report Builder and SSRS)

    And I don't know if 2012 supports even those since Microsoft no longer documents older versions. So those tags aren't supported with 2012.
    More tags are supported on current versions but it's not all that much. The tags supported for 2017 are listed in the same documentation for 2017:
    Importing HTML into a Report (Report Builder and SSRS)

    There are some additional limitations listed towards the end of the Supported HTML Tags section.

    Sue

  • nick.edey

    SSC Veteran

    Points: 207

    Hi Sue,

    Many thanks for your reply.  The link implies that the CSS color attribute should work but as it seems to be ignored on my report I'm going to put it down to using an older version of SSRS.  The text-decoration attribute is not listed on the link either so it looks like I'm not going to be able to do what I wanted.

    Thanks again for looking,
    Nick

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply