The SAS Output Delivery System and reporting techniques

can I display 2 proc tabs side by side?

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

can I display 2 proc tabs side by side?

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

Accepted Solutions
Solution
‎12-07-2015 09:19 PM
Frequent Contributor
Posts: 85

Re: can I display 2 proc tabs side by side?

[ Edited ]

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


All Replies
Solution
‎12-07-2015 09:19 PM
Frequent Contributor
Posts: 85

Re: can I display 2 proc tabs side by side?

[ Edited ]

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;

 

 

Contributor
Posts: 24

Re: can I display 2 proc tabs side by side?

that is great

 

 

worked like a charm

 

thanks Jerry

Contributor
Posts: 24

Re: can I display 2 proc tabs side by side?

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


colums.GIF
Frequent Contributor
Posts: 85

Re: can I display 2 proc tabs side by side?

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];

 

Contributor
Posts: 24

Re: can I display 2 proc tabs side by side?

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
Frequent Contributor
Posts: 85

Re: can I display 2 proc tabs side by side?

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

 

Contributor
Posts: 24

Re: can I display 2 proc tabs side by side?

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;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 718 views
  • 1 like
  • 2 in conversation