Dear SAS Communities Members: I'm using SAS version 9.3 and below is my code. data have;
infile cards dlm=',';
length a1 $10 a2-a7 $1;
input a1 a2 a3 a4 a5 a6 a7 pp;
cards;
Category 1, a, b, c, d, e, f, 1
Category 2, a, b, c, d, e, f, 1
Category 3, a, b, c, d, e, f, 1
Category 4, a, b, c, d, e, f, 1
Category 5, a, b, c, d, e, f, 1
Category 6, a, b, c, d, e, f, 1
Category 7, a, b, c, d, e, f, 1
;
run;
options nodate nonumber papersize=A4 topmargin="0.25in" leftmargin="0.25in" bottommargin="0.25in" rightmargin="0.25in" missing=' ';
ods escapechar='^'; footnote3 j=l;footnote4 j=l;
ods document name=WORK.CONTENTS(write);
title1 j=l "^S={leftmargin=0in} Study number: xxxxx" j=r "Page ^{thispage} of ^{lastpage}";
title2 j=l j=r "^S={leftmargin=0in} Date: DDMMMYYYY";
PROC REPORT DATA=have nofs NOWD
SPLIT= '|'
LS=256
contents="Department 1";
column pp a1-a7;
define a1 /group center style=[cellwidth=30mm] 'VAR 1';
define a2 /group center style=[cellwidth=30mm] 'VAR 2';
define a3 /group center style=[cellwidth=30mm] 'VAR 3';
define a4 /group center style=[cellwidth=30mm] 'VAR 4';
define a5 /group center style=[cellwidth=30mm] 'VAR 5';
define a6 /group center style=[cellwidth=30mm] 'VAR 6';
define a7 /group center style=[cellwidth=30mm] 'VAR 7';
define pp /order noprint;
break before pp /page contents='';
TITLE3 j=center height=10pt "Title 1";
TITLE4 j=left height=10pt "Department 1";
FOOTNOTE1 j=left height=10pt "Note:";
FOOTNOTE2 j=left height=10pt "Footnote 1";
FOOTNOTE3 j=left height=10pt "Footnote 2";
FOOTNOTE4 j=left height=10pt "Footnote 3";
RUN;
TITLE3 ' ';
TITLE4 ' ';
FOOTNOTE1 ' ';
FOOTNOTE2 ' ';
FOOTNOTE3 ' ';
FOOTNOTE4 ' ';
QUIT;
%let outpath=C:\Users\john.chen\Desktop;
/*Put site and date here*/
%let yy=%substr(%sysfunc(today(),yymmdd10.),1,4);
%let mm=%substr(%sysfunc(today(),yymmdd10.),6,2);
%let dd=%substr(%sysfunc(today(),yymmdd10.),9,2);
%let time=&yy&mmⅆ
ods document close;
proc document name=WORK.CONTENTS;
ods rtf file="&outpath\test_&time..rtf" style=Styles.mystyle ;
ods printer pdf file="&outpath\test_&time..pdf" style=Styles.mystyle /* notoc*/ ; replay; run;
ods printer pdf close;
ods rtf close;
quit; Then I will get the output as: And I'd like to move the title and footnote to the core marked in yellow as below. And suggestion?
... View more