Hi,
I need help with ODS RTF template, proc report column width. I would like to control column width in output. But somehow all spaces are truncating.
Below is my code,
options orientation = landscape ls=140 ps=45 nocenter nobyline nodate nonumber ; options noxwait noxsync mlogic nosymbolgen mprint missing = '' formchar='|_---|+|---+=|-/\<>*' ;
proc template; define style myrtfstyle; parent=styles.rtf; style Table from output / background=_undef_ Rules=groups Frame=void just=center font=("Courier New", 9pt) cellpadding = 1pt cellspacing = 0pt borderwidth = 0.5pt ;
style rowheader / background=white font=("Courier New", 11pt, bold) ; style header / background=white font=("Courier New", 8.5pt, bold) ; style systemtitle / font=("Courier New", 8.5pt, bold) ; style systemfooter / font=("Courier New", 8.5pt, bold) asis=on ; style data / font=("Courier New", 8.5pt) ; replace Body from Document "Controls the Body file." / bottommargin = 1 in topmargin = 1.25 in rightmargin = 0.6 in leftmargin = 0.8 in ; end; run;
ods escapechar="^";
data class; set sashelp.class; if name="Alice" then name=" Alice"; run;
ods listing close; ods rtf file="U:\delete\output.rtf" style=myrtfstyle;
proc report data=class nocenter headline headskip missing split="~" spacing=10 nowd; column name sex age height weight;
define name / display order "Name" left width=40 ; define sex / display "Sex" left width=40 flow; define age / display "Age" left width=40 flow; define height / "Height" left width=40 flow; define weight / "Weight" left width=40 flow;
break after name /skip;
title1 j=c "Summary Body Weight (kg) by Visit" j=r "page ^{pageof}"; footnote1 j=c "%sysget(SAS_EXECFILENAME)"; run;
ods rtf close; ods listing;
Thanks in advance.
Saurabh
... View more