Question: We are running a Phase 2 clinical trial where we have unique groups being treated differently and we are struggling with how to program a report to have different footnotes based on the value of a paging variable. Is it possible to have different footnotes for male patients vs. female patients? What would the eventual tables look like?
Answer: Yes, page-by variable dependant footnotes (and titles) are possible, and can be easily accomplished using ClinPlus Report, please see the SAS code below:
/**********************************************************************************
** Creating a report with conditional footnote lines.
** Conditional Footnote lines: The footnotes are different by pages
** according to a page-by variable.
**
** Example:
** The report below is paged by the variable SEX.
** For 'Female' there are 3 footnote lines,
** for 'Male' there are only two footnote lines in the report.
**
** The conditional footnote lines added to the input data set (See second data step)
** as variables ft1, ft2 and ft3.
** In the %DZSTABLE macro call the titles parameter contains the paging variable
** !SEX and the footnote parameter contains the !FT1, !FT2 and !FT3 variables.
**
** Resulting report will print the appropriate footnote limes by pages.
***********************************************************************************/
**Invoke Report Engine********************************************;
%inc "D:\dzstable\SAS920\ver710\dzsload.sas";
**RTF Style location*********************************************;
libname rtflib "d:\temp";
**Create input data set*******************************************;
proc format;
value sex 1='Female' 2='Male';
value group 1='Drug 1 ' 2='Drug 2' 3='Placebo';
value race 1='White' 2='Black' 3='Oriental' 4='Hispanic';
run;
data test;
group=1;
pat=1; age=35.5; sex=1; race=1; weight=89.7; output;
pat=2; age=45.2; sex=1; race=2; weight=156.25; output;
pat=3; age=25; sex=1; race=1; weight=178.5; output;
pat=4; age=19; sex=2; race=4; weight=92.3; output;
group=2;
pat=31; age=26.25; sex=2; race=1; weight=79.6; output;
pat=32; age=63; sex=2; race=3; weight=119.9; output;
pat=33; age=45; sex=1; race=2; weight=125.45; output;
pat=34; age=27.7; sex=2; race=2; weight=89.12; output;
pat=35; age=37.7; sex=1; race=4; weight=131.56; output;
group=3;
pat=31; age=26.25; sex=2; race=1; weight=79.6; output;
pat=32; age=63; sex=2; race=3; weight=119.9; output;
pat=33; age=45; sex=1; race=2; weight=125.45; output;
pat=34; age=27.7; sex=2; race=2; weight=89.12; output;
pat=35; age=37.7; sex=1; race=4; weight=131.56; output;
format group group. race race. sex sex.;
run;
**Add footnotes to input data set.**;
data test; length ft1 ft2 ft3 $100; set test;
if sex=1 then do;
ft1="First footline for Female";
ft2="Second footline for Female";
ft3="Third footline for Female";
end;
else if sex=2 then do;
ft1="First footline for Male";
ft2="Second footline for Male";
ft3="";
end;
run;
**Create report (with RTF output)*********************;
%dzstable(titles=@_indent Test Conditional footnotes\@_indent !syspage\Demographics Summary report\!sex\@,
display=n median mean nextto std freq nextto ppercentp ,
across=group,
down= over ,
skipline=,
data=test,
pgnumfmt=PAGE: #n of #m,
spacing=1,
ll=120, pl=47,
rtf=d:\temp\TestFootnote.rtf,
rtfStyle=rtflib\test,
multplyr=15,
footnote=%str(@_indent Common Footnote Line\@_indent !ft1\@_indent !ft2\@_indent !ft3),
options=snugfoot onlyhorz solidline blankskip center nodate nonumber);

