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

Hi all, 

 

I have a question to improve the visual output of an ODS PDF file. 

I'm presenting different tables with PROC REPORT. I could manage to set the width of each table equally. Unfortunately, the columnwidth of both tables are not the same, which looks kinda bad. Is there a way to set the width of each column in each table to one size?

 

Here is an example code: 

ods pdf file="&outpath/example.pdf" style=sapphire startpage=never;
	title "Title";
  proc report data=sashelp.cars style(report)={width=80%};
where MAKE ="Acura";
column Model Origin Type;
run;
proc report data=sashelp.cars style(report)={width=80%};
where MAKE ="Acura";
column EngineSize Horsepower Weight;
run; ods pdf close;

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
andreas_lds
Jade | Level 19

Using a define-statement for every variable, you could set the width of each column. But would not do this, because as soon as you have a variable with more text, unnecessary line breaks will be inserted. And i don't think that all tables with the same width improve the quality of the report at all.

View solution in original post

3 REPLIES 3
andreas_lds
Jade | Level 19

Using a define-statement for every variable, you could set the width of each column. But would not do this, because as soon as you have a variable with more text, unnecessary line breaks will be inserted. And i don't think that all tables with the same width improve the quality of the report at all.

Ksharp
Super User
Try
define model / style={cellwidth=4cm};
Cynthia_sas
SAS Super FREQ
Hi:
When you use PROC REPORT and a DEFINE Statement override, it is better to specify the area in parentheses, like this:
define model / style(column)={width=1in} or
define model/style(header}={background=cyan}
style(column)={color=blue width=1in};

Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 935 views
  • 0 likes
  • 4 in conversation