The SAS Output Delivery System and reporting techniques


New Contributor
Posts: 3


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.

Posts: 9,371

Re: ODS and RTF

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:
options ls=64;

ods listing;
ods rtf file='c:\temp\testls.rtf';
proc report nowd;
column region product subsidiary
sales inventory returns
sales=sal2 inventory=inv2 returns=ret2
sales=sal3 inventory=inv3 returns=ret3;
ods rtf close;
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:ƞ

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!
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation