sas rtf输出中的标题和脚注的位置

时间:2015-08-27 18:22:24

标签: sas rtf

我写了一个模板来创建三个线表。它非常接近我的需要。有一些小问题:标题和脚注通过一个或两个空行与主表分开。如何更改它以消除脚注和主表之间的空白?标题行的小。提前谢谢。

proc template;
    define style tfl_table;
        style body /
            leftmargin = 1in
            rightmargin = 1in
            topmargin = 0.5in
            bottommargin = 0.5in;
        style table /
            frame = hsides
            rules = groups
            cellpadding = 3pt
            cellspacing = 0pt
            width = 100%;
        style header /
            /*This is the header line for the table.*/
            fontfamily = 'Courier New'
            fontsize = 9pt;
        style data /
            /*This is the data in the table.*/
            fontfamily = 'Courier New'
            fontsize = 9pt;
        style SystemTitle /
            fontfamily = 'Courier New'
            color = red
            fontsize = 10pt;
        style systemfooter /
            /*This affects the text in footnoteX statement.*/
            textalign = left
            fontfamily = 'Courier New'
            fontsize = 9pt;
        style NoteContent from Note /
            /*change the font in the compute line*/
            textalign = left
            fontsize = 9pt
            fontfamily = 'Courier New';
    end;
run;

ods html close;
ods rtf file = "&dir.\test-run.rtf" bodytitle style = tfl_table;
ods escapechar = '^';

title1 'First Title with title1 statement';
title2 'Second Title with title2 statement';
footnote1 'footnote1 with footnote1 statement';
footnote2 'footnote2 with footnote2 statement';

proc report data = sashelp.class nowd;
    column sex name age height weight;
    define sex / group;
    break after sex / page;
run;
ods rtf close;

title;
footnote;

2 个答案:

答案 0 :(得分:2)

修复脚注的解决方案之一是使用以下计算后声明。但我不知道如何消除标题和主表之间的空白。

compute after _page_;
    line "footnote generated by compute after and line";
endcomp;

答案 1 :(得分:0)

如果将其切换为tagsets.rtf,您将删除其中一个脚注空白行而不进行任何其他更改(除了删除该ODS目标中的默认值bodytitle)。我不确定你是否可以删除一个空白行(部分原因是因为删除该行通常是一件坏事,但当然特定的用例可能会暗示它)。

tagsets.rtf也可以使理论成为您自己修改的标签 - 标签集可以用自己的语言编辑。右键单击Results,选择Templates,然后导航到SASHELP.TMPLMST.Tagsets。查看如何在线编辑标签集以及他们的语言如何工作 - 这不是 复杂,但也不是微不足道的。在这里随意提问,如果有人知道如何回答,你会得到答案。