DATA Step, Macro, Functions and more

Create table with only some grid lines / rules (Proc tabulate)

Reply
Highlighted
Occasional Learner
Posts: 1

Create table with only some grid lines / rules (Proc tabulate)

Hello SAS Community,

 

I want to create a table with proc tabulate with nested columns and some, but not all column grid lines.

 

That is the table, col1 has 2 categories. :

 

proc tabulate data=data ;
    class col1 col2  ;
    var row;
    table row=''*mean,
           col1='' * col2 = ''  
          /s=[frame=void rules= cols];
  run;

 

That way I get lines between all columns.

 

But I want to create grid lines or rules only between columns which are separated by the col1 variable. So there should be all categories of col2 first (without grid lines) under the first category of col2 and then should come one grid line, separating the two categories of col1, and then there should come all the categories of col2 again without grid lines.

 

Is this somehow possible?

 

Thank you very much!

 

 

I'm using SAS 9.3.

PROC Star
Posts: 1,672

Re: Create table with only some grid lines / rules (Proc tabulate)

There is no provision to dot this in SAS reports.

If it's a really important feature and if it must be automated, the "easiest" (though not easy) route may be to create an HTML report and to post-process the HTML tags, maybe to have white-colored cell borders rather than multi-column cell spans.

Frequent Contributor
Posts: 128

Re: Create table with only some grid lines / rules (Proc tabulate)

Funky things can be done with proc template, but i am not sure wether your requirement belongs to the things possible.
Ask a Question
Discussion stats
  • 2 replies
  • 83 views
  • 0 likes
  • 3 in conversation