Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background Color Formula 1

Status
Not open for further replies.

GCL2007

IS-IT--Management
Dec 11, 2007
167
0
0
US
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!!!
 
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.
 
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top