robert fuschetto Posted October 9 Share Posted October 9 Does conditional formatting exist? I am not using FML....just a regular report with option to export to Excel. I see where you can format and have brackets appear....how about making font red? Link to comment Share on other sites More sharing options...
Martin Yergeau Posted October 9 Share Posted October 9 (edited) There is the MACRO and STYLE way such as below I think that a new style attribute as been added to perform this but can't remember which one (if exist) DEFINE FILE GGSALES N_SLS /P8CB = IF EDIT(CITY, '9') IN ('B','H','M') THEN DOLLARS * -1 ELSE DOLLARS; END TABLE FILE GGSALES SUM N_SLS AS 'Sales $' BY CITY AS 'City' ON TABLE SET STYLE * DEFMACRO=NEG_SLS, MACTYPE=RULE, WHEN=N_SLS LT 0, $ TYPE=DATA, COLUMN=N_SLS, COLOR=RED, MACRO=NEG_SLS, $ ENDSTYLE END Edited October 10 by Martin Yergeau 1 Link to comment Share on other sites More sharing options...
robert fuschetto Posted October 9 Author Share Posted October 9 Is there a way to do this in the GUI? Does Design Studio allow this? Link to comment Share on other sites More sharing options...
David Beagan Posted October 9 Share Posted October 9 I prefer to code it more simply, without the MACRO: DEFINE FILE GGSALES N_SLS /P8CB = IF EDIT(CITY, '9') IN ('B','H','M') THEN DOLLARS * -1 ELSE DOLLARS; END TABLE FILE GGSALES SUM N_SLS AS 'Sales $' BY CITY AS 'City' ON TABLE SET STYLE * TYPE=DATA, COLUMN=N_SLS, COLOR=RED, WHEN=N_SLS LE 0, $ ENDSTYLE END 1 Link to comment Share on other sites More sharing options...
Martin Yergeau Posted October 10 Share Posted October 10 Does work without the MACRO since condition is simple : N_SLS LT 0 But for more complex condition you may need to use the MACRO technic sunch as below DEFINE FILE GGSALES N_SLS /P8CB = IF EDIT(CITY, '9') IN ('B','H','M') THEN DOLLARS * -1 ELSE DOLLARS; END TABLE FILE GGSALES SUM N_SLS AS 'Sales $' COMPUTE T_SLS /A1 = IF N_SLS LT 0 OR N_SLS GT 4000000 THEN 'Y' ELSE 'N'; NOPRINT BY CITY AS 'City' ON TABLE SET STYLE * DEFMACRO=HIGHLIGHT_SLS, MACTYPE=RULE, WHEN=T_SLS EQ 'Y', $ TYPE=DATA, COLUMN=N_SLS, COLOR=RED, MACRO=HIGHLIGHT_SLS, $ ENDSTYLE END 1 Link to comment Share on other sites More sharing options...
David Beagan Posted October 11 Share Posted October 11 Robert, did you see Rich Macinac's new video? Conditional styling starts at about 24 minutes into the video https://youtu.be/cPwppR7eKVU?si=OjyIfBTG_iC_ciOo&t=1440 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now