BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
formerRuser
Fluorite | Level 6

Hello community,

 

How do I change how odstext headers appear using proc template? For example, when I replace the foreground header options in proc template using replace color list and replace colors, the color of the headers does not change, although I can change the color of the paragraph text just fine. I know I could change the color within odstext style options, but what if I would like to apply changes to the whole document? For example, if I wanted to set all headers to the color purple. Here is my failed attempt:

 

proc template;
		define style Styles.teststyle;
		parent = Styles.Printer;
		replace color_list from color_list /
			'fgH' = purple /* Attempt to change header color to purple */
			'fg' = green
			'bg' = white
			'headerbg' = white
			'headerbgemph' = white
			'headerbgstrong' = white;
		replace colors from colors /
		 	'headerfgstrong' = color_list('fgH') /* Further attempt to change header color */
 			'headerbgstrong' = color_list('bgH') 
			'headerfg' = color_list('fgH');
end;
run; ods pdf file = "C:\...\TestReport.pdf" style = teststyle; ods layout start; ods region x=0.00in y=1.00in; proc odstext contents=""; P ""; H "Test header"; /* Here is my header */ P ""; P "Test text test text test text"; run; ods layout end; ods pdf close;

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  These worked for me -- with and without a template.

1) Just using style overrides:

use_style_overrides.png

2) Using a template and then a style override to reference the style element

use_template.png

 

Hope this helps,

 

cynthia

View solution in original post

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  These worked for me -- with and without a template.

1) Just using style overrides:

use_style_overrides.png

2) Using a template and then a style override to reference the style element

use_template.png

 

Hope this helps,

 

cynthia

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
  • 1 reply
  • 892 views
  • 1 like
  • 2 in conversation