BookmarkSubscribeRSS Feed
Bhavanaa
Calcite | Level 5

Hi,

 

I need help in proc report as in need more spacing and less blank space as mentioned in attachment.

 

ods listing close;
ods escapechar='^';

/*ods rtf file="C:\Users\bhavana.a\Desktop\New folder\Table 14. Site – information.rtf"*/
/*        bodytitle wordstyle='{\s15 caption;}'*/
/*        style = mystyle */
/*        startpage = yes;*/

ods rtf file="C:\Users\bhavana.a\Desktop\New folder\Table 14. Site – Information.rtf" startpage=no style=minimal headery=500 footery=500 ;
goptions reset=goptions device=sasemf target=sasemf xmax=10in ymax=7.5in ;
OPTIONS NONUMBER ORIENTATION=LANDSCAPE nodate;
ODS ESCAPECHAR='^' ;
title J=l "HCR/III/AZICHLOR/05/2015 (AZICHLOR)" ;

proc report data=dm_trans_1 nowd split='\' missing headline /*headskip*/ spacing=2;
columns (site_  site_name test1 ref1 z1);
define site_/group  'Site Number' width=4 ORDER=DATA flow center ;
define site_name/  'Site Name' width=30  flow left;

define test1/  display order=data width=12 "TRT A 40mg\N=&n2" center;
define ref1 /  display order=data width=12 "TRT B 20mg\N=&n1" center;
define z1 /  display order=data width=12 "Overall\N=&n3" center;

compute before _page_;
line @2'Table 14. Site – Information ';
endcomp;

 COMPUTE AFTER site_;
        LINE ' ';
    ENDCOMP;

footnote1 J=l "Table Generation: &sysdate:&systime by T-14.1.2.1 .sas" J=c  "Confidential" J=R  " Page ^{pageof}";
run;



ods rtf close;

 

How to make changes in it.

 

Kindly help.

 

Regards,

Bhavana

9 REPLIES 9
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry, I really have no idea what you question is here?

Bhavanaa
Calcite | Level 5

 

 

Hi,

 

Please need help in reducing the size of the blank row spaces in proc report output.

find the screenshot attached.

 

Capture1.PNG

 

Regards,

 

Bhavana

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Have you tried changing the style:

minimal 

 

Either by using another one one available or by creating one  I suspect its the style thats adding the row.  If you posted some test data in the form of a datastep, then its possible for us to test.

Ksharp
Super User
proc report data=dm_trans_1 nowd split='\'  style={output=50%}
Bhavanaa
Calcite | Level 5

Hi,

 

Thanks for quick reply.

 

It show error.

 

Please find my piece of code below. And do let me know where to insert that option.

 

ods listing close;
ods rtf file="C:\Users\bhavana.a\Desktop\New folder\Table 14 Patient Enrollment by Site – All Randomized Subjects.rtf" startpage=no style=minimal headery=500 footery=500;
goptions reset=goptions device=sasemf target=sasemf xmax=10in ymax=7.5in ;
OPTIONS NONUMBER ORIENTATION=LANDSCAPE nodate;
ODS ESCAPECHAR='^' ;

title J=l "HCR/III/AZICHLOR/05/2015 (AZICHLOR)"  ;

proc report data=dm_trans_1 nowd split='|' missing headline headskip spacing=2 ;
columns (site_  site_name test1 ref1 z1);

define site_/ group 'Site Number' width=11 ORDER=DATA flow center style(column)={just=l cellwidth=3cm } style(header)=[just=l] ;
define site_name/  'Site Name' width=25  flow left style(column)={just=l cellwidth=10cm} ;

define test1/  display order=data width=8 "Azilsartan 40mg|N=&n2" center style(column)={just=c cellwidth=4cm} ;
define ref1 /  display order=data width=8 "Olmesartan 20mg|N=&n1" center style(column)={just=c cellwidth=4cm} ;
define z1 /  display order=data width=8 "Overall|N=&n3" center style(column)={just=c cellwidth=4cm} ;

compute before _page_;
line @2'Table 14.1.2.1 Patient Enrollment by Site – All Randomized Subjects ';
endcomp;
/**/
/*COMPUTE AFTER site_/ style=[font_size=0.1pt ];*/
/*        LINE '';*/
/*     ENDCOMP;*/


COMPUTE AFTER site_;
/*        LINE '';*/
     ENDCOMP;

footnote1 J=l "Table Generation: &sysdate:&systime by T-14.1.2.1 .sas" J=c  "Confidential" J=R  " Page ^{pageof}";
run;
ods rtf close;

 

 

Thanks

Bhavana

 

 

 

Ksharp
Super User
define site_/ group 'Site Number' width=11 ORDER=DATA flow center style(column)={just=l cellwidth=3cm } style(header)=[just=l] ; --> define site_/ group 'Site Number' width=11 ORDER=DATA flow center style(report)={output=50% } ;
Bhavanaa
Calcite | Level 5

Hi,

 

There is a error.

ERROR: The style identifier REPORT is invalid in this statement.

 

I don't know how to use these styles options else i would have fixed it.

 

Kindly help me.

 

Regards,

Bhavana

Ksharp
Super User

Sorry. I mean.

 

proc report data=sashelp.class nowd style={outputwidth=10%};
run;
Ksharp
Super User

proc report data=sashelp.class nowd style={outputwidth=50%};   /*style(report)={outputwidth=50%};*/
define name/ 'Site Name' width=25 flow left style(column)={just=l cellwidth=10%} ;
run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 9 replies
  • 1691 views
  • 0 likes
  • 3 in conversation