The SAS Output Delivery System and reporting techniques

ODS RTF TEXT not in a table?

Reply
Super User
Posts: 10,500

ODS RTF TEXT not in a table?

Has anyone discovered a way to place text in an RTF document using ODS RTF TEXT="Any text" that doesn't result in the text appearing in a cell/table when opened in Word?

My users complain about copying blocks of text out of reports formated as tables.

SAS Super FREQ
Posts: 8,743

Re: ODS RTF TEXT not in a table?

Hi:

  I believe you can't change the original ODS RTF destination output. However, in the documentation for the new TAGSETS.RTF destination (SAS 9.2),

http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#p19rpsb989jyadn1kgun...

The TABLES_OFF suboption is illustrated, which does exactly what you want. If you have SAS 9.2, you should find that using this suboption just put your TEXT= string into a regular paragraph, not in a table.

   

cynthia

ods tagsets.rtf file='c:\temp\text_notab.rtf' startpage=no

                options (TABLES_OFF='usertext');

     

proc print data=sashelp.class(obs=3);

run;

   

ods tagsets.rtf text= 'This is a line of text';

   

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

run;

  

ods _all_ close;

Super User
Posts: 10,500

Re: ODS RTF TEXT not in a table?

I had experimented with TAGSETS.RTF and the TABLES_OFF='usertext' option in 9.2.0 and wasn't happy with the results. I now have 9.2.3 and I don't see any different behavior.

Here is one example of a line of the text we are currently using:

ods rtf text="^S={fontsize=26PT just=C fontweight=Bold leftmargin=1.0in rightmargin=1.0in topmargin=2in}{Nutrition Surveillance Trend Report}^{newline 5}{&yearstring}^{newline 2}{Idaho WIC Program}^{nbspace}";

When trying to use this with ODS TAGSETS.RTF TEXT= the justification and margin information is completely ignored. If instead I try ODS TEXT= then elements such as the "{" and "}" as well as some of the RTF tags such as "\b" become visible in the document.

I have done a moderate amount of searching on the SAS tech support site for TAGSETS.RTF and uses of ESCAPECHAR and while ODS RTF and ODS PDF have many examples of inline formatting I haven't found any except font size or weight that are similar to my example for ODS TAGSETS.RTF.

So at this time I'm saying this is only partially answered.

SAS Super FREQ
Posts: 8,743

ODS RTF TEXT not in a table?

Hi:

  I would really recommend working with Tech Support on this issue. They can try to figure out what's going on by looking at all your code and your output, take your version of SAS into consideration and then, if they need to escalate the question to the developers, they can do that too.

  cynthia

Ask a Question
Discussion stats
  • 3 replies
  • 398 views
  • 0 likes
  • 2 in conversation