The SAS Output Delivery System and reporting techniques

SAS Proc Template: Inside solid and outside double borders

Reply
Occasional Contributor
Posts: 6

SAS Proc Template: Inside solid and outside double borders

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
SAS Super FREQ
Posts: 8,744

Re: SAS Proc Template: Inside solid and outside double borders

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
Occasional Contributor
Posts: 6

Re: SAS Proc Template: Inside solid and outside double borders

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;
Super User
Posts: 10,548

Re: SAS Proc Template: Inside solid and outside double borders

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.

Ask a Question
Discussion stats
  • 3 replies
  • 538 views
  • 0 likes
  • 3 in conversation