BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am trying to create a PDF using a pretty simple proc report statement. My issue is that while I can change the width of the columns on the proc report viewer, the width of the columns never changes on the resulting PDF. That is, I always end up with skinny columns in my PDF file no matter what I set the column widths to.

I assume that it is something to do with ODS - is there something I should be including in my ODS PDF statement?

My code:

ods pdf file="P:\delete_me.pdf" notoc;

proc report data=rollup headline headskip nowindows;
title 'HMR Report';

column name ('HMR for Mammogram' mam_pct mam_denom)
('HMR for Pap Test' pap_pct pap_denom);
define name / order 'Clinician Name';
define mam_pct / display 'Remind Order Placed at Visit (%)' width=20 format=percent10.1;
define mam_denom / display 'n' width=20;
define pap_pct / display 'Remind Order Placed at Visit (%)' format=percent10.1;
define pap_denom / display 'n';
run;

ods pdf close;
1 REPLY 1
Tim_SAS
Barite | Level 11
The WIDTH option only controls the width of columns in monospace (listing, Report Window) output. To control the width of a column in PDF output (and HTML and RTF output), use the STYLE option and specify a value for the WIDTH style attribute.

http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002473627.htm#a003072087
http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a000146851.htm#a000531789
http://support.sas.com/documentation/cdl/en/odsug/59523/HTML/default/a002972093.htm#a002592786

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