如何移除SAS proc report列表中标题与报表正文之间的空白行
解决方案
你可以通过调整title语句的垂直偏移参数,直接抵消标题和报表内容之间的默认空白,完全不需要修改proc report的逻辑:
/* 调整move参数的第二个值(垂直偏移)适配你的输出格式,负数代表向下偏移 */ title justify=left move=(0, -0.08in) 'Title'; proc report data=have nocenter nowd headline headskip; column('--' col1 col2); define col1/ 'COL1'; define col2/ 'COL2'; run;
如果要更稳定的效果,也可以直接把表头分隔线合并到title中,关闭proc report的默认headline即可:
/* lspace=0 取消两行title之间的行间距 */ title1 justify=left lspace=0 'Title'; title2 justify=left lspace=0 '--------------------------------------------'; proc report data=have nocenter nowd noheadline; column col1 col2; define col1/ 'COL1'; define col2/ 'COL2'; run;
两种方案都仅通过修改title相关语句实现需求,不需要额外添加compute块。
内容的提问来源于stack exchange,提问作者treskov
相关产品推荐
相关产品推荐

