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

here is what i have

 


proc tabulate data=WORK.HRIR99991 missing contents = ' ' S=[foreground=highlight.];
class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
var fte;
keylabel Sum = " ";

table BUSINESS_UNIT_DESC='Record Count (Some user have multiple records)' ALL="Count" *{style=[font_weight=bold font_size=5 ]}, N='Count' /
contents = ' ' misstext=' ' box={label="&boxlabel"};

run;

 

proc tabulate data=WORK.HRIR99991 missing contents = ' ' S=[foreground=highlight.];
class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
var fte;
keylabel Sum = " ";


table BUSINESS_UNIT_DESC='FTE Count' ALL='Total' * {style=[font_weight=bold font_size=5 ]}, fte /

contents = ' ' misstext=' ' box={label="&boxlabel"};

run;

 

 

and it looks like this see attache png. instead of one above the other can they display side by side?


proctabs.PNG
1 ACCEPTED SOLUTION

Accepted Solutions
JerryLeBreton
Pyrite | Level 9

Check out ODS LAYOUT.  Lots of cool options there.

 

Really simply...

ods layout gridded     columns=2 ;

ods region;
   proc tabulate ...   ;
   ...
   run;

ods region ;
   proc tabulate ...   
   ...
   run;
ods layout end;

 

 

View solution in original post

7 REPLIES 7
JerryLeBreton
Pyrite | Level 9

Check out ODS LAYOUT.  Lots of cool options there.

 

Really simply...

ods layout gridded     columns=2 ;

ods region;
   proc tabulate ...   ;
   ...
   run;

ods region ;
   proc tabulate ...   
   ...
   run;
ods layout end;

 

 

merrittr
Obsidian | Level 7

that is great

 

 

worked like a charm

 

thanks Jerry

merrittr
Obsidian | Level 7

one last thing how can I increase the fon of the business_uint_desc variable see hilights in png attached


colums.GIF
JerryLeBreton
Pyrite | Level 9

To apply style overrides to the values of a class variable, use the CLASSLEV statement.

 

e.g.

classlev business_uint_desc / style=[font_size=5];

 

merrittr
Obsidian | Level 7

Excellent ! that worked

 

sorry to be such a pain but there is one thing I am still having issues with I have tried putting * {style=[font_size=3 ]}

after N/ -> N* {style=[font_size=3 ]}/ and fte/ ->fte* {style=[font_size=3 ]}/ but that just eliminates the formatting for all.

how do I change the font on those column headers.

 

 

(once again sorry for dummying out like this I have been trying on my own but its not seeming really intuative what to do after reading the doc)


cols.PNG
JerryLeBreton
Pyrite | Level 9

To control the style elements of the row and column headings, you use the same approach and syntax as with the CLASSLEV statement.

And just use separate CLASS statements for each class variable to specify different affects.  

 

The SAS doco may not be very easy, but google SAS papers on handling style elements in proc report/tabulate - there's quite a lot.  Try this one to start with:    https://support.sas.com/resources/papers/stylesinprocs.pdf

 

merrittr
Obsidian | Level 7

Well that was a brain buster but here is , I have style=[font_size=3 ] sprinkled all over the place to get it done

 

 

 

ods layout gridded width=12in   columns=2 ;

ods region width=5in;
  proc tabulate data=WORK.HRIR99991 style=[font_size=3 ];
   class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
   classlev BUSINESS_UNIT_DESC / style=[font_size=3];
   keylabel Sum = " ";
   keyword n / style=[font_size=3];
   table  BUSINESS_UNIT_DESC=' ' * {style=[font_size=3 ]} ALL=' ' * {style=[font_weight=bold font_size=3 ]},  N='Count'/
                  contents = ' ' misstext=' ' box={label="Record Count" style=[font_size=3 ]} ;

  run;

ods region width=5in;
  proc tabulate data=WORK.HRIR99991 missing contents = ' '  style=[font_size=3 ];
   class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
   classlev BUSINESS_UNIT_DESC / style=[font_size=3];
   var fte / style=[font_size=3];
   keylabel Sum = " ";
   table BUSINESS_UNIT_DESC=' ' * {style=[font_size=3 ]}  ALL=' ' * {style=[font_weight=bold font_size=3 ]}, fte/
                  contents = ' ' misstext=' ' box={label="FTE COUNT" style=[font_size=3 ]};

  run;
ods layout end;

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
  • 7 replies
  • 5705 views
  • 2 likes
  • 2 in conversation