Hi,
I have a variable param2 that have values of:
data:
As you can see there are indentations but when I output it in my pdf, the indentation of "N, Median, Min-Max, etc." is lost. Any idea on how to preserve the indenation?
output:
code:
ods results off;
ods listing close;
;
options formchar="|----|+|---+=|-/\<>*" ls=70 ps=70 missing = " " nodate nonumber center;
options orientation=landscape;
ods rtf file = "&analpath\Output\&pgmout._&outp._Blind.rtf" style= TLF_CN_9;
ods pdf file = "&analpath\Output\&pgmout._&outp._Blind.pdf" style= TLF_CN_9;
proc report data=final nowindows center headline headskip missing split='|' spanrows;
column avisitn order2 param2 trtg1 trtg2 trtg3 trtg4;
define avisitn / order noprint;
define order2 / order noprint;
define param2 / order "Interferon-~{unicode gamma} ELISpot Spot-Forming Units (SFUs)" style(column)={just=left cellwidth=5.6in} flow style(header)={just=left font_size=9pt};
define trtg1 / display "1.0 " style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt};
define trtg2 / display "1" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt};
define trtg3 / display "2.0" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt};
define trtg4 / display "2" style(column)={asis=on just=center cellwidth=1.2in} flow style(header)={just=center font_size=9pt};
break after param2/ skip;
compute after param2 / style(lines)={font_size = 3pt};
/* line " "; */
endcomp;
run;
ods _all_ close;
ods listing;
If you are displaying text with leading spaces, not at all clear as NO DATA provided (pictures really don't count as can't program with pictures), try adding the style override of ASIS=on. You already have that for other variables, so I'm not sure why you don't for Param2. The ASIS=on maintains things like leading spaces in the output.
@HitmonTran wrote:
Hi,
I have a variable param2 that have values of:
data:
As you can see there are indentations but when I output it in my pdf, the indentation of "N, Median, Min-Max, etc." is lost. Any idea on how to preserve the indenation?
output:
code:
ods results off; ods listing close; ; options formchar="|----|+|---+=|-/\<>*" ls=70 ps=70 missing = " " nodate nonumber center; options orientation=landscape; ods rtf file = "&analpath\Output\&pgmout._&outp._Blind.rtf" style= TLF_CN_9; ods pdf file = "&analpath\Output\&pgmout._&outp._Blind.pdf" style= TLF_CN_9; proc report data=final nowindows center headline headskip missing split='|' spanrows; column avisitn order2 param2 trtg1 trtg2 trtg3 trtg4; define avisitn / order noprint; define order2 / order noprint; define param2 / order "Interferon-~{unicode gamma} ELISpot Spot-Forming Units (SFUs)" style(column)={just=left cellwidth=5.6in} flow style(header)={just=left font_size=9pt}; define trtg1 / display "1.0 " style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg2 / display "1" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg3 / display "2.0" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg4 / display "2" style(column)={asis=on just=center cellwidth=1.2in} flow style(header)={just=center font_size=9pt}; break after param2/ skip; compute after param2 / style(lines)={font_size = 3pt}; /* line " "; */ endcomp; run; ods _all_ close; ods listing;
If you are displaying text with leading spaces, not at all clear as NO DATA provided (pictures really don't count as can't program with pictures), try adding the style override of ASIS=on. You already have that for other variables, so I'm not sure why you don't for Param2. The ASIS=on maintains things like leading spaces in the output.
@HitmonTran wrote:
Hi,
I have a variable param2 that have values of:
data:
As you can see there are indentations but when I output it in my pdf, the indentation of "N, Median, Min-Max, etc." is lost. Any idea on how to preserve the indenation?
output:
code:
ods results off; ods listing close; ; options formchar="|----|+|---+=|-/\<>*" ls=70 ps=70 missing = " " nodate nonumber center; options orientation=landscape; ods rtf file = "&analpath\Output\&pgmout._&outp._Blind.rtf" style= TLF_CN_9; ods pdf file = "&analpath\Output\&pgmout._&outp._Blind.pdf" style= TLF_CN_9; proc report data=final nowindows center headline headskip missing split='|' spanrows; column avisitn order2 param2 trtg1 trtg2 trtg3 trtg4; define avisitn / order noprint; define order2 / order noprint; define param2 / order "Interferon-~{unicode gamma} ELISpot Spot-Forming Units (SFUs)" style(column)={just=left cellwidth=5.6in} flow style(header)={just=left font_size=9pt}; define trtg1 / display "1.0 " style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg2 / display "1" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg3 / display "2.0" style(column)={asis=on just=center cellwidth=1.2 in} flow style(header)={just=center font_size=9pt}; define trtg4 / display "2" style(column)={asis=on just=center cellwidth=1.2in} flow style(header)={just=center font_size=9pt}; break after param2/ skip; compute after param2 / style(lines)={font_size = 3pt}; /* line " "; */ endcomp; run; ods _all_ close; ods listing;
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!
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.
Ready to level-up your skills? Choose your own adventure.