The SAS Output Delivery System and reporting techniques

ODS and RTF

Reply
New Contributor
Posts: 3

ODS and RTF

When I put ODS RTF in my program, SAS Listing ls=100, and lines are wraping. When I remove the ODS everithing looks fine. Of course, lines are wraping in Word too. How can I increase the LS in my output using ODS RTF. It is looking that in my SAS ODS RTF is blocked to LS=100.

Thanks,
Mirjana
SAS Super FREQ
Posts: 8,868

Re: ODS and RTF

Hi!
Generally, ODS RTF does not honor the LINESIZE that you set with the Options statement. So increasing the LINESIZE is not a concept that applies to RTF. For example, try this code:
[pre]
options ls=64;

ods listing;
ods rtf file='c:\temp\testls.rtf';
proc report data=sashelp.shoes(obs=5) nowd;
column region product subsidiary
sales inventory returns
sales=sal2 inventory=inv2 returns=ret2
sales=sal3 inventory=inv3 returns=ret3;
run;
ods rtf close;
[/pre]
And what you should see is that the LISTING window honors the LINESIZE of 64 and WILL wrap the lines, but RTF should ignore the LINESIZE of 64 and (in my version of Word) will display all of these report columns across one portrait page.

If you then change the linesize like this:
[pre]options linesize=256;[/pre]

and then rerun the program, you should see that the LISTING window no longer wraps your output line and the RTF output remains the same.

SAS and RTF are making a table DEFINITION in RTF control string format. They just build the RTF instructions for the table. It is up to the word processor (Word) to deal with rendering the table. At some point, if you do have a very wide table that Word cannot deal with, then Word WILL wrap the table -- this is just how Word deals with very wide tables.

If your question is how to get more columns across the page in ODS RTF output, then you have some ways to deal with very wide tables in RTF and PDF. They are described in this Forum thread:
http://support.sas.com/forums/thread.jspa?messageID=414ƞ

The techniques available with ODS for getting "more" on a line revolve around making the report font smaller, making the output landscape orientation or reducing cellpadding in the table (all are described in the above thread).

Good luck!
cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 519 views
  • 0 likes
  • 2 in conversation