Skip to Content

How to change the field background color in CR using HTML?

Hello,

I have a cross-tab in the report. I need to change background color of the summary field based on the database field HEX value. For this I'm interpreting field as HTML. So I created the formula fields and trying to use HTML tags to format it. I can change the font color OK, like this:

<FONT COLOR="' & {Report_SELECT_TagLayouts.FontHex} & '">' & {Report_SELECT_TagLayouts.TagColorAbbreviation} & '</FONT>

But I cannot figure out how to change the background color. I have a database field for this - {Report_SELECT_TagLayouts.BackgroundColorHex}, but even if I just use regular HEX values it doesn't work. I've tried different tags - div, span etc. - no luck.

I would appreciate your suggestions.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 18, 2017 at 09:29 AM

    Crystal only supports a limited number of HTML tags

    https://apps.support.sap.com/sap/support/knowledge/public/en/1217084

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 19, 2017 at 07:45 AM

    I think that is your problem. Once you select use HTML interpretation no other formatting works.

    Check this by turning off HTML interpretation and see if back ground colour works. You could try overlaying or underlaying a text box with conditional background colour.

    Add comment
    10|10000 characters needed characters exceeded