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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 610 views
  • 0 likes
  • 2 in conversation