cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply Dynamic background color in cross tab report ?

Former Member
0 Kudos

Dear Experts ,

I have designed cross tab report . I need to apply back ground color based on conditions .

In right click option -> format filed -> border -> back ground color formula tab , i have applied below formula , but i am getting same color in all cell . Please suggest , I am trying to attach saved report in txt format , but i am getting error sms , incorrect file format type .

if {@DV_Name} = "%Emergency" THEN
(
if {@DV_Value} >= 5 then RGB(255,128,128) else RGB(128,255,0)
)
else
if {@DV_Name} = "%Standard" THEN
(
if {@DV_Value} >= 50 then RGB(128,255,0) else if {@DV_Value} >= 45 and {@DV_Value} < 50 then crYellow else RGB(255,128,128)
)
else if {@DV_Name} = "%Normal" THEN
(
if {@DV_Value} >= 30 then RGB(128,255,0) else if {@DV_Value} >= 25 and {@DV_Value} < 30 then crYellow else RGB(255,128,128)
)
else if {@DV_Name} = "%Expedited" THEN
(
if {@DV_Value} >= 10 then RGB(255,128,128) else RGB(128,255,0)
)

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Sri,

Please try this code:

if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Emergency" AND CurrentFieldValue >= 5 then RGB(255,128,128) 
else if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Standard" AND CurrentFieldValue IN [45 to 50] THEN crYellow
else if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Standard" AND CurrentFieldValue < 50 THEN RGB(255,128,128)
else if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Normal" AND CurrentFieldValue IN [25 to 30] THEN crYellow
else if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Normal" AND CurrentFieldValue < 30 THEN RGB(255,128,128)
else if GridLabelAt("@DV_Name", CurrentRowIndex) = "%Expedited" AND CurrentFieldValue >= 10 Then RGB(255,128,128) 
else RGB(128,255,0)

-Abhilash

Answers (0)