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

Hi,

 

Is it possible for PROC REPORT to produce a table with different colours for different headings.

e.g. fieldheader1, fieldheader2 --> yellow, fieldheader3 -->blue.

 

Would it be something in the beginning of PROC REPORT syntax?

 

Proc report data= bigdata
Nowd Headline Headskip
Style(Summary)=[Foreground=Black Background=CXAEADD9 Font_Face=Arial]
Style(Header) =[Background=#0091C8
Foreground=White Font_Size=2 Font_Face=Arial Font_Weight=Bold
Just=Center whitespace=NOWRAP WIDTH=100% height=27pt tagattr='wrap:yes']
Style(Column) =[Foreground=Black Background=White Font_size=2 Font_Face=Arial whitespace=NOWRAP WIDTH = 100% ];

 

Thanks

David

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

See code sample below, you can control this in the DEFINE statement

 

proc report data=sashelp.class;
  column name age sex;
  define age / style(header)={background=red};
  define sex / 
    style(header)={background=yellow}
    style(column)={background=grey foreground=blue}
  ;
run;

View solution in original post

2 REPLIES 2
BrunoMueller
SAS Super FREQ

See code sample below, you can control this in the DEFINE statement

 

proc report data=sashelp.class;
  column name age sex;
  define age / style(header)={background=red};
  define sex / 
    style(header)={background=yellow}
    style(column)={background=grey foreground=blue}
  ;
run;
davidbao
Fluorite | Level 6

Thank you Bruno, that worked perfectly.

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
  • 1011 views
  • 3 likes
  • 2 in conversation