Focal Point
Conditional styling for Subtoal

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

March 30, 2004, 11:52 AM
<Viswa>
Conditional styling for Subtoal
Hai

I want conditional styling for Sub toals at column and not at row level.
Ex:
TABLE FILE CAR
PRINT CAR
MODEL
DEALER_COST
RETAIL_COST
BY COUNTRY
ON COUNTRY SUBTOTAL
ON TABLE SET ONLINE-FMT HMTL
END

We will get subtotal's for DEALER_COST and RETAIL_COST. We want subtoal for dealer_cost to be GREEN, if the value is greater than 10000.(NOTE: we want only the subtotal for dealer_cost to be in GREEN rather than full SUBTOTAL row). How can we acheive this?

Thanks
Viswakanth
March 30, 2004, 12:16 PM
<Grzegorz>
Try this:


TABLE FILE CAR
PRINT CAR
MODEL
DEALER_COST
RETAIL_COST
COMPUTE TOT_DC/D12.2 = IF COUNTRY EQ LAST COUNTRY THEN TOT_DC + DEALER_COST
ELSE DEALER_COST; NOPRINT
COMPUTE TOT_RC/D12.2 = IF COUNTRY EQ LAST COUNTRY THEN TOT_RC + RETAIL_COST
ELSE RETAIL_COST; NOPRINT
BY COUNTRY
ON COUNTRY SUBTOTAL
ON TABLE SET ONLINE-FMT HMTL
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=DEALER_COST, COLOR=GREEN, BACKCOLOR=YELLOW, WHEN=TOT_RC GT 10000,$
ENDSTYLE
END
(WF 5.2.4)

This message has been edited. Last edited by: <Mabel>,
March 30, 2004, 12:22 PM
<Grzegorz>
Correction:
There is:
WHEN=TOT_RC GT 10000,$
sould be:
WHEN=TOT_DC GT 10000,$
March 30, 2004, 12:27 PM
<Grzegorz>
Sorry for the 3 parts answer, but this "simplified" (i.e. normal) version is also working:

TABLE FILE CAR
PRINT CAR
MODEL
DEALER_COST
RETAIL_COST
BY COUNTRY
ON COUNTRY SUBTOTAL
ON TABLE SET ONLINE-FMT HMTL
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=DEALER_COST, COLOR=GREEN, BACKCOLOR=YELLOW, WHEN=DEALER_COST GT 10000,$
ENDSTYLE
END

This message has been edited. Last edited by: <Mabel>,