1
votes

I wrote a template to create three line tables. It is quite close to what I needed. There are small issues: The title and footnote are separated from the main table by one or two blank lines. How can I change it to eliminate the blank lines between footnotes and the main table? The small for the title line. Thanks in advance.

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
If you post this on communities.sas.com Cynthia Zender may have an answer for you.Reeza

2 Answers

2
votes

One of the solutions for fixing the footnote is use the following compute after statement. But I don't know how to eliminate the blank line between title and the main table.

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

If you switch it to tagsets.rtf, you'll get rid of one of the footnote blank lines without any other changes (other than removing bodytitle which is default in that ODS destination). I'm not sure if you can remove the one blank line (in part because it's normally a bad thing to remove that line, though of course specific use cases may suggest it).

tagsets.rtf also would make it theoretically possible for you to make your own modifications - tagsets are editable, in their own language. Right click on Results, choose Templates, then navigate to SASHELP.TMPLMST.Tagsets. Look up how to edit tagsets online and how their language works - it's not that complicated, but not trivial either. Feel free to ask questions here, and if anyone knows how to answer them you'll get an answer.