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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Colors in CR

Status
Not open for further replies.

windfallent

Programmer
Apr 25, 2005
9
IN
Can I hv more than 1 conditional coloring done in my CR ??

Here is what I m tryin to do...

if{condn1 == true} then color = blue
elseif{condn2 == true and condn1 == true} then color = navy
else color = red;

I m trying the formula bar to write this....but doesn't seem to work??

Can anyone suggest me on using the formula field??
 
I am not sure you can change colours in a formula field

but you can definitely change colours or alternate colours in any fields by right clicking on such field and choose format field from there you change font colour background colour

just click on the X-1 button and write your statement there

hope it helps


Mo
 
It is unclear whether you want to color a field or section, and whether you are referring to the background or the font. If you want to conditionally color a field, right click on the field->format field->border->background->x+2 and enter:

if condn2 = true and
condn1 = true then crNavy else
if condn1 = true then crBlue else
crRed

You would need to add the formula clauses in the above order. If you want to color a section, go to the section expert->highlight the section->color tab->background->x+2 and enter the same formula there.

-LB
 
Here is a gist of wht I m trying to do....

I hv a flag in my DB which takes 3 possible values viz.. 0,1,2.

Based on the flag, I want to change the Fore Color (ie font color)of a field entry in the CR. I tried doing this, but noticed that only a single IF.... END IF stmt works...

Can I hv a way to write multiple IF..END IF's (like a switch stmt) in the formula field so as to get colored font.

Thanks for the help anyways!!
 
go to the Format editor>font>Color
click on the X-2 button and put this on the formula

if({Flag})= 1 then blue
else if({Flag}) = 2 then red
else if({Flag}) = 3then Green
else black

Mo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top