Help using Base SAS procedures

Creating Footnote for webpage

Reply
New Contributor
Posts: 3

Creating Footnote for webpage

Hi everyone, I am trying to create footnote for a webpage that has various years of data and each year will have a different footnote. How can I get this done?
Super User
Posts: 10,028

Re: Creating Footnote for webpage

[pre]
options nobyline;
data air;
set sashelp.air;
year=year(date);
run;
ods html file='c:\temp\data.html' style=sasweb ;
title;
proc report data=air nowd;
by year;
column date air;
define date/display;
run;
footnote 'year: #byval1';
ods html close;
[/pre]



Ksharp
New Contributor
Posts: 3

Re: Creating Footnote for webpage

Thanks, Ksharp it worked.
But let me ask this, is it possible to customize the footnote for each year?.
So that there will be different footnote for each of the years.


fadt.
SAS Super FREQ
Posts: 8,866

Re: Creating Footnote for webpage

Hi:
When you use any of the #byval or #byline features, the text is the same and the only piece of the title that changes is the #byval -- in this case only the year changes.

If you create your output with BY groups and save it the output in an ODS DOCUMENT store, you can manipulate the output and/or put a completely different title or footnote for every BY group using PROC DOCUMENT statements.

There is an example of doing something similar on page 21 of this paper:
http://support.sas.com/resources/papers/sgf09/318-2009.pdf

You can see that the OBBNOTE statement set the title for Canada to 'Something' and the title for Germany to 'Something Else'. The OBBNOTE is a "before" note and the OBANOTE statement would be set for an "after" note.

cynthia
New Contributor
Posts: 3

Re: Creating Footnote for webpage

Posted in reply to Cynthia_sas
Thanks for your time.
Super User
Posts: 10,028

Re: Creating Footnote for webpage

[pre]


data air;
set sashelp.air;
year=year(date);
run;
ods html file='c:\temp\data.html' style=sasweb ;
ods escapechar='~';
title;
proc report data=air nowd;
where year eq 1950;
column date air;
define date/display;
run;
ods text="~S={asis=on fontsize=20px } Footnote A";
ods text=' ';

proc report data=air nowd;
where year eq 1951;
column date air;
define date/display;
run;
ods text='Footnote B';


proc report data=air nowd;
where year eq 1952;
column date air;
define date/display;
run;
ods text='Footnote C';






ods html close;
[/pre]



Ksharp
Ask a Question
Discussion stats
  • 5 replies
  • 152 views
  • 0 likes
  • 3 in conversation