BookmarkSubscribeRSS Feed
aneeshv
Fluorite | Level 6

Dear Team,

 

Is there any method in SAS to create report in the below given format? There is a requirement to print column header in every row.

 

 

 

Student ID

student Name

Standard

Division

Term

1st instalment

 

Tuition fee

Annual fee

Computer fee

Development fee

Total

A115

Shravan

X

A

2000

500

100

400

3000

 

 

 

 

 

 

 

 

 

Student ID

student Name

Standard

Division

Term

2nd instalment

 

Tuition fee

Annual fee

Computer fee

Developement fee

Total

A115

Shravan

X

A

2200

600

200

500

3500

3 REPLIES 3
BrunoMueller
SAS Super FREQ

What kind of output format do you need to create: HTML, PDF, CSV,...?

 

If it is PDF, there is a way for Proc REPORT to do this using a group var that changes for every row.

 

See sample below.

data myclass;
  gName + 1;
  set sashelp.class;
run;

filename xpdf temp;
ods pdf file=xpdf;
ods pdf startpage=no;

proc report data=myClass nocenter;
  column gName name sex age;
  define gName / group noprint;
  define name / display;
  define sex / display;
  define age / display;
  break after gname / page;

  compute before gname / style={just=left};
    length printLine $ 80;
    printLine = catx(":", "Line for", gName);
    line printLine $char80.;
  endcomp;
run;

ods pdf close;

So depending on what you need there might be a different approach.

 

Bruno

aneeshv
Fluorite | Level 6

Thanks , This is working.

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please mark @BrunoMueller's answer as correct.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 3 replies
  • 718 views
  • 0 likes
  • 3 in conversation