BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have following data
week dt1 dt2 ID day value
0 --
0 --
0 --
1
1
2
2
3
like this I have around 15 weeks and each week has data for more than one lab day for which dt1 and dt2 are unique. All together there are around 300 obs.
I have written the following code
proc report data=sample nowd;
columns (week day) id, (dt1 d2t val);
define id/across order=data 'Patient Id' spacing=1;
define week/group "Week" width=10;
define day/group "Day" nozero width=10 ' ';
define dt1/group 'Date1' width=10 spacing=1;
define dt2/group 'Date2' width=10 spacing=1;
define val/group " ";
run;

I am getting the data on multiple pages divided vertically . for example first four IDs data is coming on the first page in the following format
Id
week day dt1 dt2 val

but in the second page the columns week and day are not displayed as follows
ID
dt1 dt2 val

I want the columns week, day to be displayed on each page. please help me. I have to do this using proc report only.
1 REPLY 1
Tim_SAS
Barite | Level 11
Use the ID option on the DEFINE statement for DAY. This tells REPORT to put the DAY column and all the columns to the left of DAY on each page of the report. See http://support.sas.com/documentation/cdl/en/proc/59565/HTML/default/a002473627.htm#a003072099.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1 reply
  • 1485 views
  • 0 likes
  • 2 in conversation