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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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