Focal Point
Speific Cell Coloring

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6891006771

July 25, 2006, 09:43 AM
Rayden
Speific Cell Coloring
Hi All,

I am trying to hightlighg a specific cell based on conditional logic and it works, kinda. The problem is when the column in question is used as a BY value in the report definition, the conditional formatting gets applied to all the cells in the group regardless of whether there is data present. Here is my CAR example fex:


-* File colortest2.fex

TABLE FILE CAR
PRINT
COUNTRY NOPRINT
SALES
BY COUNTRY
BY CAR
BY MODEL
WHERE (SALES GT 0);
ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Legal',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
FONT='LUCIDA SANS',
JUSTIFY=CENTER,
$
TYPE=DATA,
COLUMN=N2,
BACKCOLOR=GRAY,
WHEN=N2 EQ 'ALFA ROMEO',
$
ENDSTYLE
END

When you run this you will see it sets the back color of the model column to gray where the model is ALFA ROMEO, however as there are multiple rows for this BY value it ends up coloring all the cells gray. I only want the cell with the words ALFA ROMEO in it to be affected.

Is anyone aware of a technique to achieve this?

As always any insight you guys can offer will be greatly appreciated.

Thanks,

Rayden.


Web Focus version 7.1.4
Server Windows Server 2003
July 25, 2006, 10:15 AM
Pete
Hi,


You can try it this way

TABLE FILE CAR
PRINT
COUNTRY NOPRINT
SALES
COMPUTE V_CAR/A20=IF CAR EQ LAST CAR THEN '' ELSE CAR; NOPRINT
BY COUNTRY
BY CAR
BY MODEL
WHERE (SALES GT 0);
ON TABLE PCHOLD FORMAT EXL2K

ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Legal',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
FONT='LUCIDA SANS',
JUSTIFY=CENTER,
$
TYPE=REPORT,
COLUMN=CAR,
BACKCOLOR=GRAY,
WHEN=V_CAR EQ 'ALFA ROMEO',
$
ENDSTYLE
END

Hope it helps,

P.


D: WF 7.6.2 P. : WF 7.6.2 on W2003
------------------------------------------------------------------
I see myself as an intelligent, sensitive human, with the soul of a clown which forces me to blow it at the most important moments.

-Jim Morrison-

July 25, 2006, 10:24 AM
Rayden
Hi Pete,

That is perfect, thanks. So if I use a virtual field for the comparisons it works but using the Data Column value it does not. That is what I needed to know.

Thanks again for the fast and accurate response!!

Rayden.


Web Focus version 7.1.4
Server Windows Server 2003