The SAS Output Delivery System and reporting techniques

Add a line in the top of footnotes

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Add a line in the top of footnotes

Hi SAS communities, 

 

I want to add a line in the top of footnotes . i test  that code but unfortunately give any thing : 

ods rtf text = "^S={outputwidth=100% j=l } { \line------------------------\line } ";

 

Anyone know how to do it .. 

Thanks in advance.


Accepted Solutions
Solution
Friday
Super User
Super User
Posts: 8,371

Re: Add a line in the top of footnotes

[ Edited ]

Ods text is not the same as footnotes.  A simple solution:

footnote1 "-------------------------------------";
footnote2 "...";
...

So move your footnotes down 1 and add a line (note you could also use "%sysfunc(repeat(-,30))"; to get a line of 30.

 

If you need to keep 1 as is, then you would need:

ods escapchar="^";

footnote1 "%sysfunc(repeat(-,30))^{newline}The rest of your footnote here";

The ^{newline} is to break the line at that point (its RTF code).

 

Another way would be to add a style which adds a border to the top only:

footnote1 s={bordertopwidth=1 bordertopcolor=black} "Your footnote here";

Something like that, am just typing from memory haven't tested.

View solution in original post


All Replies
Solution
Friday
Super User
Super User
Posts: 8,371

Re: Add a line in the top of footnotes

[ Edited ]

Ods text is not the same as footnotes.  A simple solution:

footnote1 "-------------------------------------";
footnote2 "...";
...

So move your footnotes down 1 and add a line (note you could also use "%sysfunc(repeat(-,30))"; to get a line of 30.

 

If you need to keep 1 as is, then you would need:

ods escapchar="^";

footnote1 "%sysfunc(repeat(-,30))^{newline}The rest of your footnote here";

The ^{newline} is to break the line at that point (its RTF code).

 

Another way would be to add a style which adds a border to the top only:

footnote1 s={bordertopwidth=1 bordertopcolor=black} "Your footnote here";

Something like that, am just typing from memory haven't tested.

Super Contributor
Posts: 487

Re: Add a line in the top of footnotes

Due to an extended lunch I give my 2 cents after the fact. But I didn't want to withhold it. it does not do ODS by the way. I figured, since footnotes are stored in dictionary.titles aka sashelp.vtitle, a macro to add a new footnote and push down all the existing ones would be simple. 

 

Here is my code for your entertainment:

 

 

options mprint;
title1 'titel 1';
title3 'titel 3';
footnote1 'footnote 1';
footnote2 'footnote 2';

%macro addfnote(newnote);

	proc sql;
		select text 
			into :fn1-:fn9
				from dictionary.titles
					where type='F'
						order by number
		;
	quit;

	%let num_notes=&sqlobs;
	%put NOTE: There are &num_notes defined footnotes:;

	/* Add the new footnote. */
	footnote1 &newnote;

	/* Push down all the existing footnotes. */
	%do i=1 %to &num_notes;
		%let next=%eval(&i + 1);
		footnote&next &&fn&i;
	%end;
%mend;

%addfnote(New footnote goes here);

proc print data=sashelp.class;
run;

 

Super User
Posts: 11,793

Re: Add a line in the top of footnotes

Posted in reply to jklaverstijn

@jklaverstijn

Your approach potentially looses the text of the last footnote (footnote10)  by only selecting the first 9. If you actually have a tenth footnote you would want to concatenate the text of 9 and 10 and hopefully insert a line break.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 153 views
  • 1 like
  • 4 in conversation