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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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