Hi everyone,
Can Proc Report display data in the below format? or any other procedure?
Column1 | 123 | Column2 | Yes | Column3 | N/A |
Column4 | Prod | Column5 | xxxx | Column6 | yyyy |
Column7 | Description |
I am interested in creating individual files (rtf or pdf) by Column1.
Thanks,
Anu.
What do you mean:
Do you want each observation in your data set to printed in separate file, where they are printed in three lines and each variables printed beside the column name as in the example you provided above.
Yes, correct. I need the data printed in 3 rows as shown below in the same output file. Can this be done using Proc Report?
Column1 | 123 | Column2 | Yes | Column3 | N/A |
Column4 | Prod | Column5 | xxxx | Column6 | yyyy |
Column7 | Description |
Show a few lines from the input data set as an example so we have an idea if it is possible.
Anu: If no one comes up with a better solution, here is a fairly easy one.
First, create and run a datastep is to assign all desired variable headers. Then use proc forms to create a pdf containing separate pages for each of your records:
data forpdf;
retain
_name 'Name:'
_sex 'Gender:'
_age 'Age:'
_height 'Height'
_weight 'Weight:'
;
set sashelp.class;
run;
ods pdf file='c:\temp\class_form.pdf' style=printer notoc;
proc forms data=forpdf align=0;
by name;
line 1 _name name _sex sex _age age /pack;
line 2 _height height _weight weight/pack;
run;
ods _all_ close;
Finally. you can use a free online pdf splitter to split the file:
Thanks, will try it out.
Yes. you can post it at ODS and Base Reporting
Cynthia will give some good advice .
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.