BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
chrissowden
Obsidian | Level 7

I am trying to get a bold bottom line above the footnotes sections. Currently the only way I can get the line above the footnotes is in Proc Report with the break after function.

 

 

%macro template;
ods path(prepend) work.SPstyles(update);

PROC TEMPLATE;
DEFINE STYLE styles.landscape8;
PARENT=styles.rtf;
REPLACE fonts /
'TitleFont2' = ("Courier New, courier",8pt)
'TitleFont' = ("Courier New, courier",8pt)
'StrongFont' = ("Courier New, courier",8pt)
'EmphasisFont' = ("Courier New, courier",8pt)
'FixedEmphasisFont' = ("Courier New, courier",8pt)
'FixedStrongFont' = ("Courier New, courier",8pt)
'FixedHeadingFont' = ("Courier New, courier",8pt)
'BatchFixedFont' = ("Courier New, courier",8pt)
'FixedFont' = ("Courier New, courier",8pt)
'headingEmphasisFont' = ("Courier New, courier",8pt)
'headingFont' = ("Courier New, courier",8pt)
'docFont' = ("Courier New, courier",8pt);

style table from table / background = _undef_ rules=groups cellspacing=0
cellpadding=0pt bordertopwidth=7 bordertopcolor=white frame=above width=100%;

style systemfooter from systemfooter / protectspecialchars=off;

style parskip / fontsize = 1pt;

REPLACE headersAndFooters FROM CELL / background = _undef_
font=fonts('HeadingFont')
foreground=black
background=white;

REPLACE BODY from DOCUMENT /
bottommargin=.1in
topmargin=1in
rightmargin=1in
leftmargin=1in;

END;
RUN;

PROC TEMPLATE;
DEFINE STYLE styles.patprof;
PARENT=styles.rtf;
REPLACE fonts /
'TitleFont2' = ("Courier New",8pt)
'TitleFont' = ("Courier New",8pt)
'StrongFont' = ("Courier New",8pt,bold)
'EmphasisFont' = ("Courier New",8pt,italic)
'FixedEmphasisFont' = ("Courier New",8pt,italic)
'FixedStrongFont' = ("Courier New",8pt,bold)
'FixedHeadingFont' = ("Courier New",8pt,bold)
'BatchFixedFont' = ("Courier New",8pt)
'FixedFont' = ("Courier New",8pt)
'HeadingEmphasisFont' = ("Courier New",8pt,italic)
'HeadingFont' = ("Courier New",8pt,bold)
'DocFont' = ("Courier New",8pt);

style table from table / background = _undef_ rules=groups cellspacing=0
cellpadding=0pt bordertopwidth=7 bordertopcolor=white frame=above width=100%;

style systemfooter from systemfooter / protectspecialchars=off;

REPLACE headersAndFooters FROM CELL / background = _undef_
font=fonts('HeadingFont')
foreground=black
background=white;

REPLACE BODY from DOCUMENT /
bottommargin=1in
topmargin=1in
rightmargin=1in
leftmargin=1in;
END;
RUN;
%mend template;

1 ACCEPTED SOLUTION

Accepted Solutions
8 REPLIES 8
ballardw
Super User

Above what Footnote? You are not showing anything about how that template may be used.

Cynthia_sas
SAS Super FREQ

Hi:

  I don't think you need PROC TEMPLATE to get a line above the footnote. Please review this Tech Support note: https://support.sas.com/kb/46/383.html which shows a way that works to change the borders starting in SAS 9.2 with RTF and PDF.

 

  Here's the original ODS ESCAPECHAR method with ODS RTF (doesn't work for PDF):

Cynthia_sas_0-1618932023757.png

 

 

  Here's the method shown in the Tech Support note:

Cynthia_sas_1-1618932052734.png

 

Screen shots are showing footnote at the bottom of page 1.

 

  Hope this helps,

Cynthia

chrissowden
Obsidian | Level 7

footnote.png

 Currently the line is done with break after like I mentioned but there is a lot of space. Trying to eliminate the spacing and bring the footnotes right under the line. 

ballardw
Super User

@chrissowden wrote:

footnote.png

 Currently the line is done with break after like I mentioned but there is a lot of space. Trying to eliminate the spacing and bring the footnotes right under the line. 


Still haven't shown how any of your output is generated.

 

chrissowden
Obsidian | Level 7

options ls=256 ps=44 orientation=landscape missing=""
topmargin="1in" bottommargin="1in" leftmargin="1in" rightmargin="1in"
nonumber nodate;



ods escapechar='~';
ods rtf file="..\..\Output\TLF\&ofilename..rtf" style=styles.lrtftmpl;
ods listing close;


proc report data=final split="^" headline headskip missing nowd spacing=2
style(header)={fontweight=medium protectspecialchars=off background=_undef_ asis=on};
column kppg kppg2 ord cnt aperiod avisitn col1 col2 col3 col4 col5 col6 col7 col8 ;


define kppg / group order order=data noprint;
define kppg2 / group order order=data noprint;
define ord / group order order=data noprint;
define cnt / group order order=data noprint;

define aperiod / group order order=data noprint;
define avisitn / group order order=data noprint;



define col1 / order "Visit^ SF-36 Component" order=data style(column)=[cellwidth=22% asis=on] style(header)=[just=l asis=on] ;
define col2 / display "Statistic" style(column)=[cellwidth=9% asis=on] style(header)=[just=l asis=on];
define col3 / display "Placebo Only^(1 or 2 Enemas)(N=&N1)" style(column)=[cellwidth=10% just=c ];
define col4 / display "1 Enema of^RBX2660^(N=&N2)" style(column)=[cellwidth=10% just=c ];
define col5 / display "2 Enemas of^RBX2660^(N=&N3)" style(column)=[cellwidth=12% just=c ];
define col6 / display "3 Enemas of^RBX2660^(N=&N4)" style(column)=[cellwidth=12% just=c ];
define col7 / display "4 Enemas of^RBX2660^(N=&N5)" style(column)=[cellwidth=12% just=c ];
define col8 / display "Total^(N=&N9)" style(column)=[cellwidth=10% just=c ];

break after kppg/page;


compute before kppg;
line @1 ' ';
endcomp;


compute after kppg2;
line @1 ' ';
endcomp;
/* */
/* compute after brk;*/
/* line @1 ' ';*/
/* endcomp;*/

***Add extra line above the column headers;
compute before _page_ / style = {just = left asis = on pretext = "~R/RTF'\brdrt\brdrs\brdrw10 '"};
line @2 " ";
endcomp;

***Add extra line at bottom of page;
compute after _page_ / style = {just = left asis = on pretext = "~R/RTF'\brdrt\brdrs\brdrw10 '"};
line @2 " ";
endcomp;
run;

ods rtf close;
ods listing;
here is an example of the proc report.
AnnabellaFarley
Fluorite | Level 6

All customers are moving en masse to the Internet, online shopping is becoming easier and more convenient, delivery of goods is developing and accelerating, and today even small companies are trying to create a website with an online store. I don't think you need PROC TEMPLATE to get the line above the footnote Trying to eliminate spaces and put footnotes right below the line. First of all, these trends are for clothing stores, flower stores, digital and appliance stores, and grocery stores. There the events calendar elementor, and you can use them to create websites.

ballardw
Super User

First you are using a custom style as indicated by this line

ods rtf file="..\..\Output\TLF\&ofilename..rtf" style=styles.lrtftmpl;

Since options in a style make a big difference in output the definition should be shown.

Second, I still don't see anything generating a FOOTNOTE.

Actual FOOTNOTEs by default go into the footer area of the document which is pretty much controlled by the amount of text placed there and is displayed by the Wordprocessor software of choice by fitting from the bottom up. So a fixed footnote takes the same amount of space on the page regardless of where other tables end.

 

You might trying the text that you want to appear after the table as a POSTTEXT= style element in the compute after block. And why do you have Pretext there???

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 3203 views
  • 0 likes
  • 4 in conversation