Skip to Content
author's profile photo Former Member
Former Member

Change Font Color of crosstab field

Hi,

Want to change the font color based on condition like when value is negative then display in RED color else display it in BLACK color.

Please note the data type used for this crosstab field is String as I need to display negative value in parenthesis

Example:

-20 should be displayed as (20) and -45.34 % should be displayed as (45.34%)

I am able to achieve above scenario through u201CHighlighting Expertu201D of crosstab field.

Formula used

Value < 0 then font color = red

Value > = 0 then Font Color = Black

But the issue is when the value is not found m retrieving u2018-u2018to display in cross tab. Since the field is string, itu2019s treating u2018-u2018in first condition & displaying hyphen also in RED color.

I tried to used below formula in Font tab of u201CFormat objectu201D of crosstab field but m not getting expected result

Formula:

If INSTR ({Value from data table}, u201C(u201C) = 1 THEN

RED

ELSE

BLACK

Is it possible to display hyphen in Black color?

Please help... Itu2019s urgentu2026

Thanks,

ThakurS

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 28, 2011 at 05:57 PM

    Hi,

    I am assuming if no value is found then you are returning ➖ from database. otherwise you can change the below formula accordingly

    if {Value from data table} = "(-)" then BLACK
    else If INSTR ({Value from data table}, u201C(u201C) = 1 THEN RED
    else BLACK
    

    I hope this helps

    Regards,

    Shantanu

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.