I have a custom PROC TEMPLATE used to style output tables, except I cannot achieve solid inside borders and double outside borders -- it has mainly been one or the other. Below is my template code:
PROC TEMPLATE; DEFINE STYLE STYLES.STARFOX; PARENT=STYLES.RTF; STYLE USERTEXT FROM USERTEXT / FONTSIZE=3.5 FONTSTYLE=ROMAN JUST=L; /*INFO FOR THE ODS TEXT STATEMENTS*/ STYLE FONTS / 'TITLEFONT2' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2,BOLD) 'TITLEFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",3,BOLD) 'STRONGFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2,BOLD) 'EMPHASISFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2) 'FIXEDFONT' = ("<MONOSPACE>, COURIER",2) 'BATCHFIXEDFONT' = ("SAS MONOSPACE, <MONOSPACE>, COURIER, MONOSPACE",2) 'FIXEDHEADINGFONT' = ("<MONOSPACE>, COURIER, MONOSPACE",2) 'FIXEDSTRONGFONT' = ("<MONOSPACE>, COURIER, MONOSPACE",2,BOLD) 'FIXEDEMPHASISFONT' = ("<MONOSPACE>, COURIER, MONOSPACE",2) 'HEADINGEMPHASISFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2,BOLD ) 'HEADINGFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2,BOLD) 'DOCFONT' = ("<SANS-SERIF>, <MTSANS-SERIF>, ARIAL",2); ; STYLE TABLEHEADERCONTAINER / BORDERTOPSTYLE=DOUBLE ; STYLE TABLEFOOTERCONTAINER / BORDERBOTTOMSTYLE=DOUBLE ; STYLE DATA / FONT_FACE = "ARIAL" FONT_SIZE = 10PT JUST=CENTER VJUST=C ; STYLE TABLE / CELLSPACING = 0.7 CELLPADDING = 1.4 FONT_SIZE = 10 JUST=CENTER VJUST=C BORDERWIDTH=1 FRAME=BOX ; STYLE HEADER / FONT_FACE = "ARIAL" FONT_SIZE = 10PT FONT_WEIGHT = BOLD JUST=CENTER VJUST=C ; STYLE ROWHEADER / FONT_FACE = "ARIAL" FONT_SIZE = 10 JUST=CENTER VJUST=C ; STYLE FOOTER / FONT_FACE = "ARIAL" FONT_SIZE=10 JUST=CENTER VJUST=C ; REPLACE COLOR_LIST / "BG" = WHITE "FG" = BLACK "BGH" = WHITE "LINK" = BLUE ; STYLE BODY FROM DOCUMENT / TOPMARGIN=.8IN BOTTOMMARGIN=.8IN RIGHTMARGIN=.9IN; END; RUN;
I'm using ODS RTF to output an RTF file. Below is sample code using the template I created:
DATA TEST; INPUT CAR $10. YEAR; DATALINES; FORD 1995 HONDA 1998 CHEVY 2001 ; RUN; ODS RTF FILE="C:\Users\Documents\TEST.RTF" STYLE=STARFOX; PROC PRINT DATA = TEST NOOBS; RUN; ODS RTF CLOSE;
You may need to adjust the BORDERTOPWIDTH to go along with the double. If there isn't much width to work with the double may appear as single.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: