BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to change the background color in styles.brick.
PROC TEMPLATE;
DEFINE STYLE STYLES.BRICKA;
PARENT = STYLES.BRICK;

REPLACE COLOR_LIST /
'BGA1' = CXAFE6E9
;
END;
ODS PATH SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ);
ODS LISTING CLOSE;
ODS NOPROCTITLE ;
ODS PDF FILE = DISK
STYLE=STYLES.BRICKA
I get many messages like this:
WARNING: Could not locate style reference 'default.colors("docfg")'.

What am I missing?
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi --
Your issue has nothing to do with the mainframe. It has to do with how you're specifying your new style. When you use the REPLACE statement, you must RESPECIFY all the style attributes for the style element that you're replacing. In this case, the style element is "COLOR_LIST" and you are trying to change the background color.

The paper might prove instructive to help you solve this problem:
http://www2.sas.com/proceedings/sugi27/p186-27.pdf
It shows the use of the REPLACE statement and RESPECIFYing ALL the style attributes. "Unable to find" messages happen because inheritance is resolved differently in SAS 8 and SAS 9 (right now) when you use the REPLACE statement. In fact, STYLES.BRICK shows you that you must RESPECIFY all the style attributes when you use REPLACE because it contains a REPLACE for COLOR_LIST. If you cut and paste the entire COLOR_LIST section from the existing STYLES.BRICK and put it into your program, and then change the BGA1 attribute, you will get a table background that is a lovely color of light blue.

Starting in SAS 9.2, the REPLACE statement behavior will change and REPLACE will essentially act like the STYLE statement as far as style template inheritance is concerned, as described here:
http://www2.sas.com/proceedings/sugi31/053-31.pdf

Good luck! If you need more help with your style template, then Tech Support is your best bet for help. Template code is lengthy.

cynthia
deleted_user
Not applicable
Thank you very much

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 663 views
  • 0 likes
  • 2 in conversation