ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 3321 views
  • 0 likes
  • 2 in conversation