|
在不改变原数据集的情况下,直接使用proc report产生报告,要求:字符过长换行的时候自动在前面产生两个或三个空格,与本身对齐。(如果解释起来比较麻烦,想能推荐资料,是否有这样的功能) 原数据集:(1.2.3.前面有两个空格,表示子项) 病理诊断 日期 1.某某某 某某某 某某某某某某某 某某某某某某某。 2012/01/25 2. 某某某某某某 某某。 2012/01/25 3. 某某某某某某 某某某某某某某某。 2012/01/25 得到结果: 病理诊断 日期 1.某某某 某某某 某某某某 2012/01/25 某某某 某某某某某某某。 2. 某某某某某某 某某。 2012/01/25 3. 某某某某某某 某某某 2012/01/25 某某某某某。 需要report出来的样子: 病理诊断 日期 1.某某某 某某某 某某某某 2012/01/25 某某某 某某某某某某某。 2. 某某某某某某 某某。 2012/01/25 3. 某某某某某某 某某某 2012/01/25 某某某某某。 下面是我的report,但是做不出那样的对齐功能:查了一些proc compute资料,要么是在数据before,要么是after,都无法实现(只是个例子,并不与上面数据所对应)。 *** Output file as rtf file using PROC REPORT; ods listing close; ods rtf file="&_table.t&PgmNm..rtf" style=global.rtf; title2 "Table &TFLNo. (&_page.)"; footnote3 j=l "n = number of patients experiencing event c = number of events"; proc report data=qc_tab.t_&PgmNm headskip spacing=1 split='|' missing nowd style(header)=[just=center protectspecialchars=off] style(column)=[just=center asis=on]; column _var_ date; define _var_ / display "System Organ Class|Preferred Term" flow style(column)=[cellwidth=35% just=left] style(header)=[just=left]; define date / display "Nilotinib|N=&n1 |n(%)/c" flow style(column)=[cellwidth=15%] style(header)=[just=center]; /* break after _group / skip;*/ run; ods rtf close; ods listing; |