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:
that's how they should appear:
Would they know how to do it?
Thank you very much and greetings.
/*
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;
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.
/*
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;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.