BookmarkSubscribeRSS Feed
STOJA
Calcite | Level 5
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
1 REPLY 1
Cynthia_sas
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1400 views
  • 0 likes
  • 2 in conversation