Discussions

Expand all | Collapse all

How to dispay -ve numbers in red color

  • 1.  How to dispay -ve numbers in red color

    Posted 12-17-2013 20:07
    I have a numeric field. I want to display all -ve numbers of that field in red color. How can I do so?


  • 2.  RE: How to dispay -ve numbers in red color

    Top
    Contributor
    Posted 12-17-2013 20:21
    I assume by "-ve" you are referring to negative numbers. This is an uncommon shorthand in the US.

    You would use a row colorization formula in the report:

    If( [field] < 0, "red")


  • 3.  RE: How to dispay -ve numbers in red color

    Posted 12-17-2013 20:54
    But I don't want to color the entire row as I have several other numeric fields that may also contain negative number. I only want to color the  negative values. Is that possible?


  • 4.  RE: How to dispay -ve numbers in red color

    Top
    Contributor
    Posted 12-17-2013 21:05
    Use a text formula field with some HTML allowed and a formula such as this:

    If( [field] < 0,
      "<span style='background-color: #EA3C53'>" & ToText([field]) & "</span>",
      [field]
    )


  • 5.  RE: How to dispay -ve numbers in red color

    Posted 01-31-2018 08:19
    It works perfect to me, the only you need is to transform the last field in text :

    If( [field] < 0, 
      "<span style='background-color: #EA3C53'>" & ToText([field]) & "</span>",
    ToText ([field])
    )

    Thanks.


  • 6.  RE: How to dispay -ve numbers in red color

    Posted 12-17-2013 22:25
    Text formula field wouldn't help as I need to summarize the field for reporting.


  • 7.  RE: How to dispay -ve numbers in red color

    Top
    Contributor
    Posted 12-17-2013 23:26
    Summarize on the original numeric field not the formula.


  • 8.  RE: How to dispay -ve numbers in red color

    Posted 12-18-2013 16:51
    Then within the summery report is it possible to show the negative numbers in red some how?


  • 9.  RE: How to dispay -ve numbers in red color

    Top
    Contributor
    Posted 03-11-2014 16:08
    Using the IF statement doesn't seem to work, as the number (difference) is showing as a positive number. How can I get 8-5 to equal -3 instead of 3?