×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Background Color Formula

Background Color Formula

Background Color Formula

(OP)
I’m having problems with a formula using CR 2013. It’s just a background color formula for a box that I want to paint using background color in Format Editor..

I have a crazy formula that checks for conditions and just paints the text box a certain color based on certain conditions in the data
if (isnull({Header.IS_STARTED}) or {Header.IS_STARTED}="N" or {Header.IS_STARTED}="") and (tonumber({@doc age})>tonumber({@WF_LIMIT})) then cryellow else
if (tonumber({@doc age})>tonumber({@WF_LIMIT}) and {Header.IS_STARTED}="Y") then crred else
if {@doc age}<={@WF_LIMIT} then crgreen else
crnocolor

This actually works but I want to add another condition that would override the other colors
if {RESPONSIBILITY.SIGNOFF}="N" then crblue else
If I add that to the beginning of the formula it makes those records blue, but it doesn't go on and do the rest of the statements. No other colors are filled in.
I know it's weird question but does anyone have ideas?
Thanks!!!

RE: Background Color Formula

Of course once any of the statement is true then it will execute that statement and of course the if statement will be finished (not processing any of the else-ifs). I am confused since you said you wanted to override the other colors, thus from what you have said, you did not want the rest of the colors to be processed.

RE: Background Color Formula

(OP)
if the {RESPONSIBILITY.SIGNOFF} was N then I wanted it to stop and do crblue. But if {RESPONSIBILITY.SIGNOFF} was Y or anything else, I wanted it to continue on and process the rest of the statements and colors.

RE: Background Color Formula

I'm having a little trouble visualizing the box--does it recur for each row of data? Is this a text box that contains fields?

I think you should take a look at detail level data to observe how your signoff field behaves and how that the relates to the problem you are having. Can it be null? You might want to try adding an additional clause:

If not isnull({responsibility.signoff}) and
{Responsibility.signoff}="N" then //etc.

This would allow later instances of nulls for this field to considered in the rest of the formula without shutting down the entire formula.

-LB

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close