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
SAS Super FREQ

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
SAS Super FREQ

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. 

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