The SAS Output Delivery System and reporting techniques

ODS PDF - PROC REPORT text bleeding over into next column

Reply
Occasional Contributor
Posts: 15

ODS PDF - PROC REPORT text bleeding over into next column

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

Super User
Posts: 10,466

Re: ODS PDF - PROC REPORT text bleeding over into next column

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.

Occasional Contributor
Posts: 15

Re: ODS PDF - PROC REPORT text bleeding over into next column

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.

Super User
Posts: 10,466

Re: ODS PDF - PROC REPORT text bleeding over into next column

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.

SAS Super FREQ
Posts: 8,740

Re: ODS PDF - PROC REPORT text bleeding over into next column

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
Occasional Contributor
Posts: 15

Re: ODS PDF - PROC REPORT text bleeding over into next column

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

Ask a Question
Discussion stats
  • 5 replies
  • 495 views
  • 0 likes
  • 3 in conversation