2015-08-27 223 views
1

我寫了一個模板來創建三個線表。這與我所需要的非常接近。有一些小問題:標題和腳註通過一兩行空白行與主表分開。我如何改變它以消除腳註和主表之間的空白行?小標題行。提前致謝。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; 
+1

如果您將其發佈在communities.sas.com上,Cynthia Zender可能會爲您解答。 – Reeza

回答

2

修復腳註的一個解決方案是使用以下compute after語句。但我不知道如何消除標題和主表之間的空白行。

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

如果你切換到tagsets.rtf,你會擺脫腳註空行的一個沒有任何其他變化(不是刪除bodytitle這是在消耗臭氧層物質的目標默認值等)。我不確定是否可以刪除一條空白行(部分原因是刪除該行通常是一件壞事,儘管當然有特定的用例可能會提示它)。

tagsets.rtf也會使它理論上您可以做出自己的修改 - 標記集是可編輯的,用他們自己的語言。右鍵單擊結果,選擇模板,然後導航到SASHELP.TMPLMST.Tagsets。查看如何在線編輯標記集以及他們的語言如何工作 - 這不是複雜,但也不是微不足道的。隨意在這裏提問,如果有人知道如何回答他們,你會得到答案。