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
Diamond | Level 26
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

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