BookmarkSubscribeRSS Feed
Phil0917
Fluorite | Level 6

Hi Everyone,

   I am having an issue where I am outputting a report to a PDF destination, but a column which contains very long text strings is having the text itself crossing over the cell border and into the neighboring column (see attached picture below).  Any ideas?? The following is the code I used:

 

ods pdf file="<filename>.pdf" startpage=no uniform style=dash;

proc report data=esc nowd style(report)=[rules=all frame=box background=black] split="|";
where esctype ne " ";
columns ("^S={font_face=Arial font_size=14pt font_weight=bold just=c background=CXD3D3D3}Escalations|^S={font_face=Arial font_size=12pt font_weight=medium just=c background=CXD3D3D3}Number of Initial Escalations = &escobs"
site_no esctype activity_type status compdt asgnd_to_full_name comments escdays);
define site_no / display "Site" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=c cellwidth=1.2cm vjust=c};
define esctype / display "Escalation Type" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=c cellwidth=2.5cm vjust=c};
define activity_type / display "Communication Method" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=l cellwidth=3.2cm vjust=c};
define status / display "Status" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=c cellwidth=1.5cm vjust=c};
define compdt / display "Escalation Date" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=c cellwidth=2.5cm vjust=c};
define asgnd_to_full_name / display "Escalated To" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=l cellwidth=3cm vjust=c};
define comments / display "Comments" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=l cellwidth=13cm vjust=c};
define escdays / display "Days Open" style(header)=[just=c font_size=11pt font_weight=bold background=lightblue]
style(column)={just=c cellwidth=1.2cm vjust=c};
compute esctype;
if esctype="Initial" then do;
call define(_row_,"style","style=[font_style=bold]");
end;
endcomp;
run;

 

ODS PDF Text Overflow.jpg  

Thanks!

 

-Phil

5 REPLIES 5
ballardw
Super User

Does this happen without all of the style overrides and default pdf ods style?

Is style DASH a SAS supplied style?

 

I've had some odd things occur with lots of style settings in overrides with some ODS Styles.

 

Also, do you have an encoding issue involved? You're getting unprintable characters in the body of the comments.

Phil0917
Fluorite | Level 6

That "DASH" style is a user-defined style, but is really just setting margins and the default font.  It still happens without the style as well.  Also, I have been using this same style for many years without any issue - this has just started happening recently.  We did move from version 9.1.3 to version 9.4 last year - not sure if there is something in the new version that is affecting this?

 

 I don't believe that the unprintable characters are affecting this, as it happens on rows without any.  These are just carriage returns in the source data that come over as those hex characters.

ballardw
Super User

Was your Dash style build by modifying an existing SAS style? Did you rebuild it with a similar version from 9.4?

 

I have a custome style originally built in SAS 9.1.3 that did not provide the same output with 9.2. It turned out that the base style was defined differently and I had to change how I modified inherited properties to work with the base 9.2 version.

 

I might try playing around with paper size or page margins to get more print space and see if that helps any.

Cynthia_sas
SAS Super FREQ
Hi:
There WERE a lot of changes for PDF and text rendering between 9.1.3 and 9.2 and then again between 9.2 and 9.3. Here are some papers on the topic.
https://support.sas.com/resources/papers/proceedings14/SAS038-2014.pdf
and
http://support.sas.com/resources/papers/proceedings10/035-2010.pdf

I'd recommend working with Tech Support on this.

cynthia
Phil0917
Fluorite | Level 6

Thanks to you both for your help!!  I guess it does have something to do with these changes since 9.1.3 in the style templates and how ODS PDF handles the text within cells.  I will follow up with Tech Support.

 

Thanks again!!

 

-Phil

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 1229 views
  • 0 likes
  • 3 in conversation