BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
webart999ARM
Quartz | Level 8

Hi Folks,

 

Hope everyone is doing good.

Could you help me with one question regarding proc report?
Below is the part of my report which I need to update.

webart999ARM_0-1599740713704.png


First two columns highlighted with the black need to be moved up (mentioned with arrow).
I could not find the appropriate option to solve that 'problem'.
Below is the proc report of the above-mentioned report.

proc report data=final nowindows headline headskip split='^' style(header)=[cellspacing=0 ] style=[cellwidth=100%];
	   column I ord2 col1
	  ("~S={borderbottomcolor=black borderbottomwidth=1} &trt" col2 col3 ("~S={borderbottomcolor=black borderbottomwidth=1 cellheight =10% } TEXT" col4 col5)col6) ;
	  define I/order order=internal noprint;
	  define ord2/order order=internal noprint;
	  define col1 / display " " 							                    style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=16%];
	  define col2 / display "TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))"   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col3 / display "TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))"   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col4 / display "300 mg^(N=%sysfunc(trim(&TEXT.)))" 	            style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col5 / display "600 mg^(N=%sysfunc(trim(&TEXT.)))" 				style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col6 / display "All^300mg^Patients^(N=&TOT1.)" 					style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	

	  compute before i;
	  line "";
	  endcomp;
	  compute after ord2;
	  line "";
	  endcomp;

run;
ods rtf close;
ods listing;



Thank you in Advance
Artur












1 ACCEPTED SOLUTION

Accepted Solutions
Oligolas
Barite | Level 11

Hi,

 

since you are using a spanning header for col5 and 6, one way could be to display the label of col2, col3 and col6 in a spanning header and no more in the define statement. Something like this:

proc report data=final nowindows headline headskip split='^' style(header)=[cellspacing=0 ] style=[cellwidth=100%];
	   column I ord2 col1
	  ("~S={borderbottomcolor=black borderbottomwidth=1} &trt" 
         ("TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))" col2) 
         ("TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))" col3) 
         ("~S={borderbottomcolor=black borderbottomwidth=1 cellheight =10% } TEXT" col4 col5)
         ("All^300mg^Patients^(N=&TOT1.)" col6
      ) ;
	  define I/order order=internal noprint;
	  define ord2/order order=internal noprint;
	  define col1 / display " " 							                    style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=16%];
	  define col2 / display ""   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col3 / display ""   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col4 / display "300 mg^(N=%sysfunc(trim(&TEXT.)))" 	            style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col5 / display "600 mg^(N=%sysfunc(trim(&TEXT.)))" 				style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col6 / display "" 					style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	

	  compute before i;
	  line "";
	  endcomp;
	  compute after ord2;
	  line "";
	  endcomp;

run;

 

________________________

- Cheers -

View solution in original post

2 REPLIES 2
Oligolas
Barite | Level 11

Hi,

 

since you are using a spanning header for col5 and 6, one way could be to display the label of col2, col3 and col6 in a spanning header and no more in the define statement. Something like this:

proc report data=final nowindows headline headskip split='^' style(header)=[cellspacing=0 ] style=[cellwidth=100%];
	   column I ord2 col1
	  ("~S={borderbottomcolor=black borderbottomwidth=1} &trt" 
         ("TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))" col2) 
         ("TEXT^300 mg^(N=%sysfunc(trim(&TEXT.)))" col3) 
         ("~S={borderbottomcolor=black borderbottomwidth=1 cellheight =10% } TEXT" col4 col5)
         ("All^300mg^Patients^(N=&TOT1.)" col6
      ) ;
	  define I/order order=internal noprint;
	  define ord2/order order=internal noprint;
	  define col1 / display " " 							                    style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=16%];
	  define col2 / display ""   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col3 / display ""   	        style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col4 / display "300 mg^(N=%sysfunc(trim(&TEXT.)))" 	            style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col5 / display "600 mg^(N=%sysfunc(trim(&TEXT.)))" 				style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	  define col6 / display "" 					style(column)=[just=l asis=on] style(header)=[Just=c cellwidth=6%];
	

	  compute before i;
	  line "";
	  endcomp;
	  compute after ord2;
	  line "";
	  endcomp;

run;

 

________________________

- Cheers -

webart999ARM
Quartz | Level 8
That approach worked. Thank you 🙂

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1376 views
  • 1 like
  • 2 in conversation