Hi,
I have one question.
I using ods pdf for save my data set.
But, It has problem.
My data has many columns, so pdf file show two pages. Not one pages.
Then, I want to fix my first column for second page.
like this
pdf view
<Now pdf file>
ID Age Weight Height ...... <- 1st page
1 15 157 58 ..........
.
.
BMI ..... <- 2nd page
23
<I want this pdf file>
ID Age Weight Height ...... <- 1st page
1 15 157 58 ..........
.
.
ID BMI ..... <- 2nd page
1 23
How do I solve this problem? please Help Me!
ods pdf file='c:\temp\x.pdf';
proc report data=sashelp.class nowd;
column name sex age weight height;
define name/display id;
define weight/display page;
run;
ods pdf close;
You can do this with PROC REPORT. Cynthia has written a useful tutorial:
You can also adjust the orientation of the page:
options orientation=landscape;
Before your pdf call will set page to wider rather than longer so you can fit more or. You can also adjust cell widths:
proc report... ... define id / style={cellwidth=1cm}; ... run;
So the cell fits the data. You can add wrapping within cell with split characters, or adjust the font size, or put ID on a by line, or combine columns etc. There are hundreds of ways of achieving a certain output.
@J_hoon wrote:
Hi,
I have one question.
I using ods pdf for save my data set.
Why do you "save" your dataset as pdf? For re-using the data it would be better to copy the dataset to a permanent library.
ods pdf file='c:\temp\x.pdf';
proc report data=sashelp.class nowd;
column name sex age weight height;
define name/display id;
define weight/display page;
run;
ods pdf close;
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!Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.