Skip to Content
avatar image
Former Member

How to apply Dynamic background color in cross tab report ?

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)
)
screenshot.png (11.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 28, 2017 at 07:56 AM

    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

    Add comment
    10|10000 characters needed characters exceeded