BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

I am trying to replicate the functionality present in ods RTF for ODS PDF, where if style with width=100% is specified in proc template or in proc report statement, the columns spread to occupy 100% of space, without any gaps between the columns. 

 

I am unable to get the same functionality for pdf. E.g. for a landscape page, I am specifying 2 columns with widths 1 inch each along with width=100% in proc report statement. This creates big gap between two columns and after the end of last column.  

 

Can these gaps between the columns and after the last column be eliminated such that the columns widths automatically spreadout for ODF pdf. I am using SAS 9.3

 

Thanks.

 

Vineet

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:
I find it difficult in ODS PDF to "overcontrol" the widths. PDF will sometimes do what you want, but not always. My recommendation is to use WIDTH=100% and then NOT control the individual columns OR to control the individual columns, but not the width of the whole report. One or the other technique works best for me, but not both.

cynthia

 

Also, ODS PDF has the UNIFORM option, so that will cost you some overhead in pre-processing, but on a multipage report should serve to make the columns uniform across all pages without even fiddling with width.

 

For example, this works quite nicely for me without overcontrolling the individual column widths.

cynthia

options orientation=landscape topmargin=.25in bottommargin=.25in
        leftmargin=.25in rightmargin=.25in;

ods pdf file='c:\temp\test_uniform_with_width.pdf' notoc uniform;
title;
proc report data=sashelp.cars 
     style(report)={width=100%};
  column make model type origin cylinders enginesize msrp invoice;
run;
ods pdf close;

View solution in original post

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:
I find it difficult in ODS PDF to "overcontrol" the widths. PDF will sometimes do what you want, but not always. My recommendation is to use WIDTH=100% and then NOT control the individual columns OR to control the individual columns, but not the width of the whole report. One or the other technique works best for me, but not both.

cynthia

 

Also, ODS PDF has the UNIFORM option, so that will cost you some overhead in pre-processing, but on a multipage report should serve to make the columns uniform across all pages without even fiddling with width.

 

For example, this works quite nicely for me without overcontrolling the individual column widths.

cynthia

options orientation=landscape topmargin=.25in bottommargin=.25in
        leftmargin=.25in rightmargin=.25in;

ods pdf file='c:\temp\test_uniform_with_width.pdf' notoc uniform;
title;
proc report data=sashelp.cars 
     style(report)={width=100%};
  column make model type origin cylinders enginesize msrp invoice;
run;
ods pdf close;
vineet7878_gmail_com
Obsidian | Level 7

Thanks Cynthia, for quick reply. I wish ODS pdf & RTF were designed such that these options worked interchangeably in same way. 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 2 replies
  • 4913 views
  • 0 likes
  • 2 in conversation