Help using Base SAS procedures

Report display question

Reply
Contributor anu
Contributor
Posts: 23

Report display question

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.

Super Contributor
Posts: 490

Re: Report display question

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.

Contributor anu
Contributor
Posts: 23

Re: Report display question

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
Super User
Posts: 10,535

Re: Report display question

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

PROC Star
Posts: 7,364

Re: Report display question

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/

Contributor anu
Contributor
Posts: 23

Re: Report display question

Thanks, will try it out.

Super User
Posts: 9,687

Re: Report display question

Yes. you can post it at ODS and Base Reporting

Cynthia will give some good advice .

Ask a Question
Discussion stats
  • 6 replies
  • 240 views
  • 3 likes
  • 5 in conversation