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 .

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1656 views
  • 3 likes
  • 5 in conversation