就是frame = hsides rules = group在起作用,style(report) = {}等選項直觀意義,參考SAS inline formating STYLE常用選項
options nodate ;
ods rtf file = './_3.rtf';
proc report data = sashelp.class
style(report)={frame = hsides rules = group }
;
column name sex age height weight;
define name / display;
define sex / display;
define age / display;
define height / display;
define weight / display;
run;
ods rtf close;
proc report 常用選項
nowindows missing spanrows center split = " " colwidth = 2 formchar(2) = '-'
missing:對GROUP ORDER ACROSS變量,缺失值認為是有效值
style(report) = {
frame = hsides rules = group just = center width = 100%
cellpadding = cellspacing =
}
style(header) = {
just = center vjust = bottom fontsize = 9pt fontweight = light fontfamily = 'Courier New' backgroundcolor = _undef_
}
style(column) = {
just = center vjust = top fontsize = fontweight = fontfamily = "" asis = on 如果在這指定just = 則在define中just就無效了。
just = dec 小數點對齊,是靠右對齊
}
asis 就是保護空格,防止壓縮空格。比如,a = " 1",如果不加asis = on, 如果在一行開頭,空格就都沒了。如果多個空格存在於單詞之間,無需考慮,把每個空格當做字母。

style(lines) = {
just = center fontsize = fontweight = fontfamily = protectspecialchars = on
}
其它:
ods rtf file = ''
bodytitle 把title和footnote作為正文的一部分,默認是不作為正文的一部分。
startpage = group
;中的選項;
* ls = 200 只在ODS LISTING 中有效,在這無效 spacing = 0 列之間的間隔,只在listing中有效 headerline headskip只在listing中有效 colwidth = 5,列寬,會被define的widht語句覆蓋 spanrows group的時候,這個變量只在一個group顯示一次 split = '~' 遇到這個字符就換行 missing 對缺失值,當成正常字符處理 _undef_ 可以是一切屬性的值,未定義 formchar(7) = '+'. 當computer計算一些統計量時或者PROC REPORT系統自動添加一些分割線時,使用這個字符 center|nocenter 居中還是左對齊,會被style(report)中的選項覆蓋 ; proc sort data = sashelp.class out = class; by sex; run; options nodate ; ods rtf file = './_3.rtf'; proc report data = class out = _a nowindows nocenter colwidth=5 spanrows formchar(7)='+' split='`' missing style(report)={frame = hsides rules = group just = center cellpadding = 1 cellspacing = 0.02 width = 100%} style(header) = {just = center vjust = bottom font_size = 9pt font_weight = light font_face = 'Courier New' backgroundcolor = _undef_} style(column) = {just = center vjust = top font_size = 9pt font_weight = light font_face = 'Courier New' asis = yes} style(lines) = {just = center font_size = 9pt font_weight = light font_face = 'Courier New' protectspecialchars = off} ; column sex name age height weight; define sex / group ; define name / display; define age / display; define height / display; define weight / display; compute after; line '====='; endcomp; run; ods rtf close;


