I have an rtf output with no current data based on the subset. How do I print text "No Data" in the output along with the table shell in proc report?
current output:
want:
What is the code you are currently using to generate the report?
It would sure be nice to have at least ONE variable name to test.
@HitmonTran wrote:
my code is quite long and complicated because it is for table programming:
I hoped my request would be consider for the Proc Report bit.
You are asking how to add something to Proc Report output and it helps to have some structure to hang things on.
proc report data = final1 nowd headline headskip missing split='@' style(header column)=[protectspecialchars=off];
%if &blind=Y %then %do;
columns ordx1 aebodsys subordx1 aedecod desc ("1.0 mg@ @(N=&trtgn1)" TRTxG1 TRTG1 )("1.0 mg@Placebo@(N=&trtgn2)" TRTxG2 TRTG2) ("1.0 mg –@Placebo" rd1) ;
define ordx1 / descending order order=internal noprint;
define aebodsys / order order=internal noprint;
define subordx1 / descending order order=internal noprint;
define aedecod / order order=internal noprint;
define desc /display style(header)=[just=left] style(column)=[asis=on cellwidth=1.7 in ] flow " ";
/*%do k=1 %to &totgrps;
%let lbl=;
%let lbl=%scan(&collist,&k,'~');
define %scan(&alltrt,&k) / display "&lbl.|(N=&&trtgn&k)"
style(column)={asis=on just=center cellwidth=1in} flow style(header)={just=center font_size=9pt};
%end;*/
define TRTxG1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.7 in] "E";
define TRTG1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.7 in] "P (%)";
define rd1 /display style(header)=[just=center] style(column) = [just=center cellwidth=.7 in] "RD";
define TRTxG2 /display style(header)=[just=center] style(column) = [just=center cellwidth=.7 in] "E";
define TRTG2 /display style(header)=[just=center] style(column) = [just=center cellwidth=.7 in] "P (%)";
compute before aebodsys;
line "";
endcomp;
%end;
run;
ods rtf close;
ods listing;
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.