BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MikeRhoads
Obsidian | Level 7

I tried TAGSETS.RTF this morning for the first time, just for the heck of it, with a simple program that has a 3-page PROC PRINT and a 1-page PROC FREQ.

The biggest difference I noticed from traditional ODS RTF output was the placement of the footnotes on "short" pages. With ODS RTF, the footnotes always wind up at the bottom (since Word is managing them), which is what I expect and want.

With TAGSETS.RTF, however, when I have output that only partially fills the page, such as my PROC FREQ or the last page of my PROC PRINT, the footnote is placed directly after the procedure output, rather than at the bottom of the page. To me, this is odd and somewhat annoying.

I realize that with TAGSETS.RTF, the footnote information is within the body of the document rather than in the Microsoft Word header and footer, but is there any way to tell SAS to always put it at the very bottom of the page, where I want it?

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Found it! Try the TAGSETS.RTF_SAMPLE destination. I was teaching and didn't have a chance to pursue this, but I did finally discover that the wonderful ODS developers have already gotten requests for this behavior. And, they've written a version of TAGSETS.RTF that puts the SAS titles and footers into the header and footer areas of the RTF document.

  They wrote about the RTF_SAMPLE tagset a while ago in this paper (updated version):

http://support.sas.com/rnd/base/ods/odsrtf/067-31-updated.pdf and I found that TAGSETS.RTF_SAMPLE was included in SAS 9.3 template item store. So, you don't have to download the code if you have SAS 9.3.

cynthia

ods tagsets.rtf_sample file='c:\temp\something_new.rtf'

    options(doc='Help');

title 'the title';

footnote 'the footnote';

proc report data=sashelp.class(obs=1) nowd;

run;

title; footnote;

ods _all_ close;

View solution in original post

6 REPLIES 6
BlackTea
Calcite | Level 5

Hi,

I have the same "problem" ( see https://communities.sas.com/message/144593#144593 ) and thought that I could solve it like described here

http://www.phuse.eu/download.aspx?type=cms&docID=4197

But I cannot modify my tagset due to a SAS bug (I have SAS 9.3 M0), perhaps you can do it.

I think that one must modify the pagebreak event where the rtf control code for header and footer is defined. Maybe you can do it Smiley Happy If yes, let me know...

NovGetRight
Obsidian | Level 7

but the footnote can't apply  j=r "@R/RTF'\qr Page these attributes, and the color is not grey, like normal, but black

Cynthia_sas
SAS Super FREQ

HI:

  It is not a good idea to add your comment in the middle of a year old posting. It would be better to start a new post and refer to this post in your description. I was about to report a problem with the forum system because I did not initially see you post here in the middle of all the other postings from a year ago.
     

  The color is NOT gray. Your footnote default color is BLACK. Normally, the "original" RTF -- ODS RTF -- put the footnote from SAS into the "footer area" of the Word document. If you go into Edit Footer mode, you will see that although the footnote text looks gray/grey in the document, when you are in Edit Footer mode, the Footnote is really in black font color.
      

  I do not know what you mean when you say, "but the footnote can't apply  j=r "@R/RTF'\qr" because with J=R, you should not need to use RTF control strings like \qr. If you run the attached code, you will see that, no matter what destination I use, the colors in the footnote lines are slightly muted versions of the colors that you would see if you went into Edit Footer mode. This explains why the normally black footnote looks gray/grey. When you use TAGSETS.RTF, the footnote is NOT put into the footer section of the Word document. The SAS Footnote is put into the BODY of the document, so there is no muting of the color.
    

Cynthia

   

ods rtf file='c:\temp\examp_orig.rtf' ;

ods tagsets.rtf file='c:\temp\examp_new.rtf' ;

ods tagsets.rtf_sample file='c:\temp\examp_samp.rtf';

   

proc print data=sashelp.shoes(obs=50);

title 'This is the Title';

footnote j=r color=cyan 'This is the Footnote 1';

footnote2 j=l color=purple 'This is Footnote 2';

footnote3 j=c color=green 'This is Footnote 3';

  var region product sales;

run;

ods _all_ close;

Cynthia_sas
SAS Super FREQ

Hi:

  Found it! Try the TAGSETS.RTF_SAMPLE destination. I was teaching and didn't have a chance to pursue this, but I did finally discover that the wonderful ODS developers have already gotten requests for this behavior. And, they've written a version of TAGSETS.RTF that puts the SAS titles and footers into the header and footer areas of the RTF document.

  They wrote about the RTF_SAMPLE tagset a while ago in this paper (updated version):

http://support.sas.com/rnd/base/ods/odsrtf/067-31-updated.pdf and I found that TAGSETS.RTF_SAMPLE was included in SAS 9.3 template item store. So, you don't have to download the code if you have SAS 9.3.

cynthia

ods tagsets.rtf_sample file='c:\temp\something_new.rtf'

    options(doc='Help');

title 'the title';

footnote 'the footnote';

proc report data=sashelp.class(obs=1) nowd;

run;

title; footnote;

ods _all_ close;

MikeRhoads
Obsidian | Level 7

That does the trick -- thanks!

Mike

BlackTea
Calcite | Level 5

But the continued tag at the end of a table which has page breaks is now gone Smiley Sad

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 6195 views
  • 3 likes
  • 4 in conversation