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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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