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

Hi Everyone,

I want to print table sashelp.class with column AGE highlighted with yellow background.

Can anyone help me to do it?

Thank you,

HHCFX

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
proc report data=sashelp.class;
columns name age sex weight height;
define name / display;
define age / style=[background=yellow];
define sex / display;
define weight/ format=8.1;
define height/ format=8.1;
run;quit;

More complicated options are here:

http://www2.sas.com/proceedings/forum2008/224-2008.pdf

 


@hhchenfx wrote:

Hi Everyone,

I want to print table sashelp.class with column AGE highlighted with yellow background.

Can anyone help me to do it?

Thank you,

HHCFX


 

View solution in original post

2 REPLIES 2
Reeza
Super User
proc report data=sashelp.class;
columns name age sex weight height;
define name / display;
define age / style=[background=yellow];
define sex / display;
define weight/ format=8.1;
define height/ format=8.1;
run;quit;

More complicated options are here:

http://www2.sas.com/proceedings/forum2008/224-2008.pdf

 


@hhchenfx wrote:

Hi Everyone,

I want to print table sashelp.class with column AGE highlighted with yellow background.

Can anyone help me to do it?

Thank you,

HHCFX


 

Cynthia_sas
Diamond | Level 26

Hi:

  And a variation, if you want to be able to style the header cell separately from the data cells.

proc report data=sashelp.class;
columns name age sex weight height;
define name / display;
define age / style(header)={background=yellow font_style=italic}
             style(column)={background=lightblue};
define sex / display;
define weight/ format=8.1;
define height/ format=8.1;
run;
quit;

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
  • 2 replies
  • 982 views
  • 0 likes
  • 3 in conversation