In proc report, I am having difficulty getting the indentation before second level (High Level Term 1) or third level and so on.
When I use style(column)=[cellwidth=6.5 cm JUST=LEFT asis=on], I get indentation but the continuous next line starts from the beginning because of the sentence length. Eg:
Is there a way to get indentation aligned for different level?
Here is my proc report program:
proc report data=final nowindows split='~' headline headskip contents='' formchar(2)='_' missing spacing=1;
*by seq seq_c1 seq_trt;
columns sqn seq ord cat _c1 - _c6;
define sqn / group order=data noprint;
define seq / group order=data noprint;
define ord /display order=data noprint;
define cat / display order=data style(column)=[cellwidth=6.5 cm JUST=LEFT asis=on] style(header)=[JUST=LEFT] flow ;
define _c1 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center] ;
define _c2 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center];
define _c3 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center];
define _c4 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center];
define _c5 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center];
define _c6 / display order = data style(column)=[cellwidth=2.8 cm JUST=LEFT] style(header)=[JUST=Center];
compute cat;
if ord=3 then do; cat=' '||cat; end;
if ord=4 then do; cat=' '||cat; end;
endcomp;
compute after sqn;
line '';
endcomp;
run;
Thank you.
Here is a small code to generate data:
data check;
length sqn 8. cat $100.;
input sqn cat $;
datalines;
1 Uncoded
2 Uncoded
3 ABNORMAL-MENSTRUATION-DIAGNOSTIC-CURETTAGE-OF-THE-UTERINE-CAVITY.
3 ANXIETY
3 CARPAL-TUNNEL-SYNDROME
3 EXACERBATION
;
run;
compute cat
, those are doing the indentation? – Joedatalines
code block) that should replicate the issue? – Joe