The SAS Output Delivery System and reporting techniques

How to add a bottom line to the header like the picture

Reply
New Contributor
Posts: 4

How to add a bottom line to the header like the picture

my procedures are as follows: proc template; define style styles.myrtf; style table / cellpadding = 0 pt cellspacing = 0.75 pt borderwidth = 1.5 pt bordercolor = black borderstyle = solid frame = hsides rules = groups; style systemtitle from titlesandfooters / font = ('Arial', 10.5pt, Bold ); style data / font = ('Arial', 10pt ); style header / font = ('Arial', 10pt ); end; run; options nodate nonumber; title; ods rtf file="D:\test.rtf" style=styles.myrtf; proc report data=sashelp.class nowd; column Name ("Important variables" Sex Age Height Weight); run; ods rtf close;
无标题.png
Trusted Advisor
Posts: 1,459

Re: How to add a bottom line to the header like the picture

ou may find some hints in next link:

 

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000220968.htm

 

you can underline titles on HTML, PDF and probably some other ODS outputs.

 

otherwise you can add TITLE2 '  ____________ ';

SAS Super FREQ
Posts: 703

Re: How to add a bottom line to the header like the picture

Hi

 

There is some definition involved, but it is possible to do, see this paper for more details.

https://support.sas.com/resources/papers/proceedings11/246-2011.pdf

 

Here is a sample program based on the paper mentioned.

ods escapechar="^";

proc report nowd data=sashelp.class 
  style(report)=[rules=none frame=void] 
  style(header)=[borderbottomcolor=black borderbottomwidth=2 background=_undef_]
;
  column
    ('^{style[borderbottomcolor=white borderbottomwidth=2
        bordertopcolor=black bordertopwidth=2]}' name) 
    ('^{style[borderbottomcolor=black borderbottomwidth=2
        bordertopcolor=black bordertopwidth=2]spanned header}' 
    age sex weight height)
  ;

  compute after _page_ / style={bordertopcolor=black bordertopwidth=2};
    line ' ';
  endcomp;
run;

There might be other ways as well

 

Bruno

SAS Super FREQ
Posts: 8,818

Re: How to add a bottom line to the header like the picture

Hi:

  Here's a very simple way using STYLE=JOURNAL and TEXTDECORATION style attribute.

ods escapechar="^";

ods rtf file='c:\temp\underline.rtf' style=journal;
proc report nowd data=sashelp.class ;
  column name sex ('^{style[textdecoration=underline]Important Variables}' age height weight);
run;
ods rtf close;

which results in this (viewed in Word).

cynthia

 

underline.png

 

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