Hi Cynthia
I have tried out the options on my code but they seem to not output accordingly.
Please see below the data and code i used. The columns i am trying to align is CD1 UC1 TOTAL1.
ods path work.tmp(update) sasuser.templat(update) sashelp.tmplmst(read); proc template; define style gaps; parent=styles.journal; class parskip / fontsize = 1pt; end; run;
data final_1; length AESOC AEPT cat $200 _NAME_ _LABEL_ UC1 CD1 TOTAL1 $15; infile datalines dlm=',' dsd; input AESOC $ AEPT $ sot cat $ _NAME_ $ _LABEL_ $ CD Total UC _page cnt UC1 $ CD1 $ TOTAL1 $; datalines; ,,1,Number of Subjects with Any TEAE,COUNT,Frequency Count,84,103,19,1,1,19 (67.9),84 (80.0),103 (77.4) Blood and lymphatic system disorders,,2,Blood And Lymphatic System Disorders,COUNT,Frequency Count,1,1,0,1,2,0 (0.0),1 (1.0),1 (0.8) Blood and lymphatic system disorders,Infectious mononucleosis,2.1,Infectious Mononucleosis,COUNT,Frequency Count,1,1,0,1,3,0 (0.0),1 (1.0),1 (0.8) Cardiac disorders,,2,Cardiac Disorders,COUNT,Frequency Count,1,3,2,1,4,2 (7.1),1 (1.0),3 (2.3) Cardiac disorders,Palpitations,2.1,Palpitations,COUNT,Frequency Count,1,3,2,1,5,2 (7.1),1 (1.0),3 (2.3) Ear and labyrinth disorders,,2,Ear And Labyrinth Disorders,COUNT,Frequency Count,1,1,0,1,6,0 (0.0),1 (1.0),1 (0.8) Ear and labyrinth disorders,External ear cellulitis,2.1,External Ear Cellulitis,COUNT,Frequency Count,1,1,0,1,7,0 (0.0),1 (1.0),1 (0.8) Epidermal and dermal conditions,,2,Epidermal And Dermal Conditions,COUNT,Frequency Count,1,1,0,1,8,0 (0.0),1 (1.0),1 (0.8) Epidermal and dermal conditions,Erythema,2.1,Erythema,COUNT,Frequency Count,1,1,0,1,9,0 (0.0),1 (1.0),1 (0.8) Eye disorders,,2,Eye Disorders,COUNT,Frequency Count,0,1,1,1,10,1 (3.6),0 (0.0),1 (0.8) Eye disorders,Corneal abrasion,2.1,Corneal Abrasion,COUNT,Frequency Count,0,1,1,1,11,1 (3.6),0 (0.0),1 (0.8) Gastrointestinal disorders,,2,Gastrointestinal Disorders,COUNT,Frequency Count,25,32,7,1,12,7 (25.0),25 (23.8),32 (24.1) Gastrointestinal disorders,Abdominal and gastrointestinal infections,2.1,Abdominal And Gastrointestinal Infections,COUNT,Frequency Count,1,1,0,1,13,0 (0.0),1 (1.0),1 (0.8) Gastrointestinal disorders,Abdominal discomfort,2.1,Abdominal Discomfort,COUNT,Frequency Count,1,1,0,1,14,0 (0.0),1 (1.0),1 (0.8) Gastrointestinal disorders,Abdominal pain,2.1,Abdominal Pain,COUNT,Frequency Count,3,3,0,1,15,0 (0.0),3 (2.9),3 (2.3) Gastrointestinal disorders,**bleep** abscess,2.1,**bleep** Abscess,COUNT,Frequency Count,1,1,0,2,,0 (0.0),1 (1.0),1 (0.8) Gastrointestinal disorders,**bleep** fistula,2.1,**bleep** Fistula,COUNT,Frequency Count,1,1,0,2,1,0 (0.0),1 (1.0),1 (0.8) ; run;
ods escapechar='^'; options orientation=landscape nodate nonumber pageno=1; ods tagsets.rtf file="C:\Users\Dinkepile\Desktop\SAP\test\test_pagexofy.rtf" style=gaps;
proc report data=final_1 nowd split='~' missing style ( report )=[frame=hsides outputwidth = 10in background = white font_face='Courier New' font_size=4] style(column)={just=CENTER font_face='Courier New' background=white foreground=black font_size=3 cellwidth=.6in} style(header)={just=center font_face='Courier New' cellheight=.5in font_size=3 foreground=black cellwidth=.6in background=white font_style=roman vjust=t} ; title j=c 'My Title' j=r 'Page ^{thispage} of ^{lastpage}'; column _page AESOC AEPT sot cnt cat ( UC1 CD1 TOTAL1);
define _page / order order=internal noprint; define AESOC / ORDER order=internal noprint ; define AEPT / order order=internal noprint; define sot / order order=internal noprint; define CNT / order order=internal noprint; define CAT / display "System Organ Class / Preferred Term" style(header)={just=left cellwidth=3in} style(column)={just=left cellwidth=3in font_face='Courier New' font_size=3};
define UC1 / display "UC (N=28))~N(%)" style(header)={just=CENTER cellwidth=0.7in} style(column)={just=CENTER cellwidth=0.5in font_weight=medium font_face='Courier New' font_size=3};
define CD1 / display "CD (N=103)~N(%)" style(header)={just=CENTER cellwidth=0.7in} style(column)={just=CENTER cellwidth=0.5in font_face='Courier New' font_size=3};
define TOTAL1 / display "All Subjects (N=131)~N(%)" style(header)={just=CENTER cellwidth=1.2in} style(column)={just=CENTER cellwidth=1.2in font_face='Courier New' font_size=3 protectspecialchars = off};
compute CAT; if sot>=2.1 then do; call define(_col_,'style','style={leftmargin=.15in}'); end; endcomp; compute before _page; line " "; endcomp; compute after AESOC; line " "; endcomp; Break after _page/ page; run; ods tagsets.rtf close;
... View more