|
Hello all ,
I trying to generate a report where each Individual page is would be using a
same separate dataset with a different title . I am was able to get the
dataset ready and get report in different pages using by statement of proc
report . But getting the different label seems to hard . Any idea how to do
that . I can't use the Title3 opition . In the Final dataset I have a
variable called Label which is label of the variable (part of title I was to
represent ) . I am not sure if this right way of generation this kind of
report if there is any other better way. Please let me know if my question
is not clear I can write back with an example data.
and also by using Proc report this way I am getting count rec txt Label as
the title in the report which I do not want
My code snipnet
%moa(count =1 ) ;
%moa(count =2 ) ;
proc datasets memtype=data ;
contents data=_all_ out = work_contents;
run;
proc sql noprint ;
select Distinct memname Into : List_ds separated by ' '
from work_contents
where memname LIKE 'FINAL_REPORT2_%';
%put &List_ds. ;
Quit;
Data all ;
set &List_ds. ;
run;
proc sort data = all ;
by count rec txt Label ;
run;
filename rtfout "&rtfout/t_moa_confir_all.rtf";
options formchar='|----|+|---+=|-/\<>*' pageno=1 number nocenter mprint
ps=35 ls=132;
filename tmpfile temp;
proc printto new print=tmpfile;
run;
title1 justify=l "&data_mode - &pgm_mode" justify=r "&systime &sysdate";
proc report data=all split='|' headline headskip nowd;
by count rec txt Label ;
column rec col1 trt1 ("--LY2439821--" trt5 trt6);
define rec / order noprint ;
define col1 / "Status change" width=30 flow left;
define trt1 / "Placebo| N=(&_n1.)" width=15;
define trt5 / "80 mg| N=(&_n5.)" width=15;
define trt6 / "180 mg| N=(&_n6.)" width=15;
break after rec / skip;
compute before _page_;
line @2 " ";
line @2 " Confirmation analysis for #BYVAL(txt) -- #BYVAL(Label)
(swollen status: 1=present; 0=absent) ";
line @2 "Population";
line @2 " ";
endcomp;
compute after _page_;
line @2 128*"-";
line @2 "";
line @2 "Report: &out_path./t_moa_confir_all.rtf";
line @2 "Program: &pgm_path./&pgm_name";
line @2 "Data: &in_path";
endcomp;
run;
proc printto; run;
|