There is a pageline= parameter you set to "yes" or "no" (no quotes) to say if you want a line drawing above the footnotes and parameters pageline1-pageline15 where you supply quoted text that you want displaying as footnotes. There is also a pagemacro= parameter that you can use instead of pageline1-pageline15 and you set this to the name of the macro you use to create footnotes in compute blocks. Whatever code this macro calls, either directly or indirectly, must not have any data step or procedure boundaries in it and what it should produce is syntactically correct code for proc report compute block processing.
There are "endline" equivalents of the "pageline" parameters and these are for when you just want to show footnotes at the end of a report and not on ever page. These parameters are named endline=, endline1-endline15 and endmacro= as you would expect. Only the "pageline" parameters will be demonstrated on this page but the same applies to "endline" parameters.
/* Demonstrate %npcttab: program 1 */
options noovp nodate nonumber center missing=" " formchar='|_---|+|---+=|-/\<>*'; options sasautos=("C:\spectre\macros" SASAUTOS); options ls=78 ps=63; title1; proc format;
proc sort data=sasuser.demog(where=(fascd=1))
%popfmt(demog,trtcd,uniqueid=patno invid) proc sort data=sasuser.adv
data adv;
%npcttab(dsin=adv,midlvl=amsoc,lowlvl=ampt,
|
Here is the report with the pageline drawn and the two footnotes.
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Gastrointestinal disorders
General disorders and administration site conditions
Psychiatric disorders
Musculoskeletal and connective tissue disorders
Respiratory, thoracic and mediastinal disorders
Vascular disorders
Nervous system disorders
______________________________________________________________________________
|
If the above report was two pages long or the page size small then you
would get footnotes on each page but it might not break the page in a good
place. Here is the same output again with a page size of 30 and rerun.
options ps=30;
%npcttab(dsin=adv,midlvl=amsoc,lowlvl=ampt, pageline=yes,pageline1="This is the first page line",pageline2="This is the second page line"); |
You can see that the report has thrown a page at a bad place because
it has split one of the groups.
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Gastrointestinal disorders
General disorders and administration site conditions
Psychiatric disorders
Musculoskeletal and connective tissue disorders
Ambident (1g/day) Betamax (500mg/day)
Total
Back pain 3 ( 33.3) 4 ( 50.0) 7 ( 41.2) Respiratory, thoracic and mediastinal disorders
Vascular disorders
Nervous system disorders
______________________________________________________________________________
|
It is better to force a page throw using the pageon= parameter
which is a list of text items in quotes separated by spaces of the beginning
value of text of the highest level term to force a page throw. If I used
pageon="Psych" "General" then I would get a three page report.
*- set page size back to original -;
options ps=63; %npcttab(dsin=adv,midlvl=amsoc,lowlvl=ampt,pageon="Psych" "General", pageline=yes,pageline1="This is the first page line",pageline2="This is the second page line"); |
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Gastrointestinal disorders
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
General disorders and administration site conditions
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Psychiatric disorders
Musculoskeletal and connective tissue disorders
Respiratory, thoracic and mediastinal disorders
Vascular disorders
Nervous system disorders
______________________________________________________________________________
|
%macro foot;
%local i; %do i=1 %to 18; line @1 "Footnote line %sysfunc(putn(&i,words.))"; %end; %mend foot; %npcttab(dsin=adv,midlvl=amsoc,lowlvl=ampt,pageon="Psych" "General",
|
And here are the results.
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Gastrointestinal disorders
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
General disorders and administration site conditions
______________________________________________________________________________
Ambident (1g/day) Betamax (500mg/day)
Total
Psychiatric disorders
Musculoskeletal and connective tissue disorders
Respiratory, thoracic and mediastinal disorders
Vascular disorders
Nervous system disorders
______________________________________________________________________________
|
Use the "Back" button of your browser to return to the previous page.