BookmarkSubscribeRSS Feed
Foxer
Fluorite | Level 6

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;

Capture.PNG
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Again, without seeing your FULL code and understanding the destination that you are using the style template with, it is nearly impossible to comment on the template. Border lines are particularly tricky, because each destination interprets the border lines slightly differently.

What is your destination of interest? What is the rest of your code link? Can you post some data?

cynthia
Foxer
Fluorite | Level 6

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;
ballardw
Super User

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 1897 views
  • 0 likes
  • 3 in conversation