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
Diamond | Level 26

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
Diamond | Level 26

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1439 views
  • 1 like
  • 2 in conversation