The SAS Output Delivery System and reporting techniques

grouping variables

Reply
N/A
Posts: 0

grouping variables

hello if anyone know the solution please reply me

Here is my data

SNO Name First Last ENG SOC MATH SCHOOL CITY
1 Sam Johnathon Sam Johnathon 70 90 80 St Patrick Cary

I need a report


ist table
SNO Name FIRST LAST


2nd table
ENG SOC MATH


3rd table
SCHOOL CITY





for each student i.e SNO



the variables are grouped depending on the requirement.

i tried with proc report using ID statement but i couldnt seperate the variables according to the required output.


Please reply me if anyone know the solution


thanks
Sid
Valued Guide
Posts: 632

Re: grouping variables

Let me ask a couple of questions to refine what you are try to achieve. Do you want three tables on one page for each SNO? If you want three separate tables, will not three PROC steps each with a BY statement do the trick?

Your second two example reports do not have SNO is this an oversight or are they somehow summarizing across SNO?
N/A
Posts: 0

Re: grouping variables

thanks for your reply

yes i want 3 tables in a page for each observation

consider it as studentnumber which should be present in each table
Valued Guide
Posts: 632

Re: grouping variables

You will probably want to look into ODS LAYOUT to get the three reports on one page.

Since you will be using three different PROC steps for each student, you have a couple of options.
1) my choice, because it involves macros, use a %DO loop to execute the three procs once for each studentnumber.
2) generate all your tables individually using BY statements and then recombine them using PROC DOCUMENT. This I have not done, but it should be doable.
Ask a Question
Discussion stats
  • 3 replies
  • 151 views
  • 0 likes
  • 2 in conversation