Remove all of the grid lines from within an ODS RTF table except from beneath the column headers


To remove all of the grid lines except those that are beneath the column headers, use the RULES style attribute within the Table style element. Use the BACKGROUND style attribute to prevent the background color of the table from showing, and use the style attribute FRAME to remove the box from around the table.

To remove the shading from both the column headers and the row headers, specify the BACKGROUND style attribute within the Header and Rowheader style elements. View the output.

proc template;
   define style styles.TEST;
      parent=styles.rtf;
      style Table from output /
            Background=_UNDEF_
            Rules=groups
            Frame=void;
      style Header from Header /
            Background=_undef_;
      style Rowheader from Rowheader /
            Background=_undef_;
    end;
run;

ods rtf file='rtf.rtf' style=styles.test;

proc print data=sashelp.class;
   title 'line beneath the column headers';
run;

ods rtf close;