BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
3 REPLIES 3
ArtC
Rhodochrosite | Level 12
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?
deleted_user
Not applicable
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
ArtC
Rhodochrosite | Level 12
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.

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 795 views
  • 0 likes
  • 2 in conversation