BookmarkSubscribeRSS Feed
HitmonTran
Pyrite | Level 9

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:

1.png

 

want:

2.png

4 REPLIES 4
ballardw
Super User

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
Pyrite | Level 9
my code is quite long and complicated because it is for table programming:

ballardw
Super User

@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.

 

HitmonTran
Pyrite | Level 9
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;

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1880 views
  • 0 likes
  • 2 in conversation