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

Conditionally color perent field based on percentage

Status
Not open for further replies.

bkno

Technical User
Feb 23, 2004
10
US
Using Oracle 9 I have created a table that tracks the performance of our Venders on a monthly basis. Now I have to create a report against that table. I need to conditionally color the background of the % field for Categories 5. 6. 7. 8. base on weather Deeds received is below 79.9 percent. If the percentage for Deeds Received falls below 79.9 then I have to conditionally color the % field’s background base on the Legend below.

Vender Category Sum %
Ginn 1. Funded 20 NULL
Ginn 2. Deeds Received 1606 79.0
Ginn 3. Deeds Recd WithNoTitle 140 6.89
Ginn 4. Title Poli Received 1591 78.33
Ginn 5. ScheduleB(Not Resolved) 0 0
Ginn 6. ScheduleB(TotExceptions) 0 0
Ginn 7. Schedule A (Not Resolved) 20 0.98
Ginn 8. Schedule A (Tot Exceptions) 27 1.32
Ginn 9. Referred To Legal 0 NULL

Color Legend
Schedule B if % >= 2.0 then green
Schedule B if % > 2.1 and % < 3.9 then yellow
Schedule B if % >= 4.0 red


Schedule A if % >= 5.0 then green
Schedule A if % > 5.1 and % < 10.0 then yellow
Schedule A if % >= 10.1 then red

Thanks in advance for you help.
 
You should be able to right click on the percent field->borders and colors->border tab->background->x+2 and enter:

if {table.category} like "*"+"Schedule B"+"*" then
(
if round({table.percent},1) <= 2.0 then crGreen else
if round({table.percent},1) in 2.1 to 3.9 then crYellow else
if round({table.percent},1) >= 4.0 then crRed
) else
if {table.category} like "*"+"Schedule A"+"*" then
(
if round({table.percent},1) <= 5.0 then crGreen else
if round({table.percent},1) in 5.1 to 10.0 then crYellow else
if round({table.percent},1) >= 10.1 then crRed
) else
crNoColor

-LB
 
I appoligize for not replying sooner. Your resolution to my issue worked perfectly. I appriciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top