BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

I am using proc report

I want that top header "ID info"  and top header "measurement info" will be in yellow background color with big font size.

I want that low header "x" "w" "y" will be with blue background color with small font size.

Can anyone help ?

 

data tbl;
input x w y;
cards;
1 2 3
4 5 6
7 8 9
;
run;

proc report data=tbl nowd headline headskip
STYLE(Header)={background=lightblue foreground=black }
STYLE(column)={background=lightgray foreground=black}
STYLE(report)=[rules=rows bordercolor=black];
/*Title 'גליון 1';*/
column ("ID info" x w) ("measurement info" y) ;
define x / display ;
define w / display ;
define y / display ;
run;

1 REPLY 1
bstarr
Quartz | Level 8

Try putting style option in the DEFINE statements, like such:

proc report data=tbl nowd headline headskip
STYLE(Header)={background=yellow foreground=black fontsize=14pt}
STYLE(column)={background=lightgray foreground=black}
STYLE(report)=[rules=rows bordercolor=black];
/*Title 'גליון 1';*/
column ("ID info" x w) ("measurement info" y) ;
define x / display style(hdr)=header{background=lightblue fontsize=10pt};
define w / display style(hdr)=header{background=lightblue fontsize=10pt};
define y / display style(hdr)=header{background=lightblue fontsize=10pt};
run;

See this thread for additional info:

https://communities.sas.com/t5/SAS-Procedures/How-do-I-Change-the-color-of-column-headers-under-an-a...

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 608 views
  • 0 likes
  • 2 in conversation