BookmarkSubscribeRSS Feed
MattR
Calcite | Level 5

I'm having an issue with word wrap when running the same report in both rtf and pdf formats. When I use ods rtf, it breaks between words as expected. For example:

Presidents

----------

George

Washington

Abraham

Lincoln

Franklin

Delano

Roosevelt

But when I use ods pdf, it automatically breaks within words to fit to the column width:

Presidents

----------

George Was

hington

Abraham Li

ncoln

Franklin D

elano Roos

evelt

which of course is not what I want. I can't fix it by changing the width of my columns, either, or they won't all fit on the report. Does anyone know if there's a way to fix the pdf output?

Thanks much!

3 REPLIES 3
MattR
Calcite | Level 5

Ok, may have already answered my own question. I had "asis=on" in my style data command. Removing this allowed the pdf text to wrap correctly, however I have no idea why. If anyone can tell me why that worked, I would greatly appreciate it!

ballardw
Super User

You don't say where you were using ASIS but it modifies the general rules for spaces in strings. My use for ASIS usually involves not supressing leading spaces in Proc Tabulate but I can see it also overriding a "if the next word won't fit in the space allowed on this line move it to the next line" to "print all the characters in the width of the column before moving to next line".

MattR
Calcite | Level 5

Thanks; that makes sense. It was used in a template under "style data" step, but I'm not sure why I would need it there since I wouldn't want leading spaces in my data, anyway. I think it will work to leave it out, though.

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
  • 3 replies
  • 1156 views
  • 3 likes
  • 2 in conversation