BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Cristina_inet
Fluorite | Level 6

Hello everyone,


we are generating a report with ods pdf.
Tables generated with proc report and proc tabulate appear in this report.
Some tables appear to exceed the size of the sheet and move to the next sheet.
The table cannot be made smaller because the headers would not be read, since they are long.

 

that's how they appear now:

Cristina_inet_0-1692170490918.png

 

 

that's how they should appear:

Cristina_inet_1-1692170528943.png

 


Would they know how to do it?
Thank you very much and greetings.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
/*
Here are two ways.
1) To make font size be smaller.
2) To make paper size be bigger.
*/



/*1) To make font size be smaller.*/
ods pdf file='c:\temp\temp.pdf' ;
option orientation=landscape nodate nonumber 
       leftmargin=0in rightmargin=0in topmargin=0in bottommargin=0in;
title;
proc report data=sashelp.heart(obs=100) nowd 
style={outputwidth=100%} 
style(header column)={fontsize=8px };
define _all_/display;
run;
ods pdf close;



/*2) To make paper size be bigger.*/
ods pdf file='c:\temp\temp.pdf' ;
option orientation=landscape nodate nonumber 
       leftmargin=0in rightmargin=0in topmargin=0in bottommargin=0in
       papersize=(100in 50in);
title;
proc report data=sashelp.heart(obs=100) nowd 
style={outputwidth=100%} ;
define _all_/display;
run;
ods pdf close;

View solution in original post

2 REPLIES 2
ballardw
Super User

Are you expecting to actually print this on paper?

If not you might investigate setting the system option PAPERSIZE to something larger to accommodate your headers in a readable fashion.

This, if placed before the ODS PDF (or RTF ) would use a 20 inch wide by 15 inch high logical page size for the output.

options papersize=(20in, 15in);

This doesn't really affect any ODS destination that doesn't use pages, such as HTML.

 

Reset back to your default after finished with that size by using Papersize= your default, likely one of LETTER or A4.

 

Or use some sort of post-processing tool such as sending the report to RTF and using a word processor program with a macro to rotate the text, then create the pdf from there.

Ksharp
Super User
/*
Here are two ways.
1) To make font size be smaller.
2) To make paper size be bigger.
*/



/*1) To make font size be smaller.*/
ods pdf file='c:\temp\temp.pdf' ;
option orientation=landscape nodate nonumber 
       leftmargin=0in rightmargin=0in topmargin=0in bottommargin=0in;
title;
proc report data=sashelp.heart(obs=100) nowd 
style={outputwidth=100%} 
style(header column)={fontsize=8px };
define _all_/display;
run;
ods pdf close;



/*2) To make paper size be bigger.*/
ods pdf file='c:\temp\temp.pdf' ;
option orientation=landscape nodate nonumber 
       leftmargin=0in rightmargin=0in topmargin=0in bottommargin=0in
       papersize=(100in 50in);
title;
proc report data=sashelp.heart(obs=100) nowd 
style={outputwidth=100%} ;
define _all_/display;
run;
ods pdf close;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 410 views
  • 2 likes
  • 3 in conversation