BookmarkSubscribeRSS Feed
anu
Fluorite | Level 6 anu
Fluorite | Level 6

Hi everyone,

Can Proc Report  display data in the below format? or any other procedure?

Column1123Column2YesColumn3N/A
Column4ProdColumn5xxxxColumn6yyyy
Column7Description

I am interested in creating individual files (rtf or pdf) by Column1.

Thanks,

Anu.

6 REPLIES 6
mohamed_zaki
Barite | Level 11

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.

anu
Fluorite | Level 6 anu
Fluorite | Level 6

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?

Column1123Column2YesColumn3N/A
Column4ProdColumn5xxxxColumn6yyyy
Column7Description
ballardw
Super User

Show a few lines from the input data set as an example so we have an idea if it is possible.

art297
Opal | Level 21

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:

http://www.splitpdf.com/

anu
Fluorite | Level 6 anu
Fluorite | Level 6

Thanks, will try it out.

Ksharp
Super User

Yes. you can post it at ODS and Base Reporting

Cynthia will give some good advice .

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 6 replies
  • 978 views
  • 3 likes
  • 5 in conversation