I am having problems using when in stylesheet to color the value in a column when it is defined field and I cannot use the real field in the when clause. please see the code attached and help me.
-* File testwhen.fex
DEFINE FILE CAR
DEALERCOST/P17.2CM = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
TABLE FILE CAR
ON TABLE SET STYLE *
BACKCOLOR=( RGB(255 255 255) RGB(230 230 230) ),
COLOR=RED, WHEN= DEALER_COST LE 5000 ,$
COLOR=RED, WHEN= DEALERCOST LE 5000 ,$
BACKCOLOR=RGB(000 000 102),
COLOR=RGB(255 255 255),
TYPE=SUBHEAD, SIZE=8, $
I need the same behaviour on the dealercost field as with dealer_cost. I tried holding the first table request and then using the hold file - doesn't work.
Thanks in Advance,
VipulThis message has been edited. Last edited by: <Mabel>,
I have fixed this problem....I am posting this as this was so simple but totally threw me off. Yes I am a rookie.
Just so you donot make such silly stupid mistakes like I do all the time.
I just have to change the Defined field format from Packed to Decimal. The when condition will not work on packed fields
|<Pietro De Santis>|
Don't be hard on yourself. I would say that the fact that WHEN styling won't work with a packed field is a deficiency of the software, not of the programmer!
|Powered by Social Strata|