Hi Xia,
Thanks for your help. I did work on it a bit, but would you please help me to figure out few more things.
1. Student name and Student ID to appear on top of the document (see attached)
2. 'TOTAL' to go under group type.
3. Total Required field is a GROUP variable, is there a way to write the total at the bottom (I wrote it in the picture (18))? Total Required is a variable which explains how many course they have to complete from each group type.
4. Suppress 'Volunteer Hours (40 hrs)' & 'Interview' group type and put it inside the same table but after the 'TOTAL'. I doubt that such thing is possible, but I want to achieve at least the way I have shown in the picture. In either case, it should be associated with a Yes/No response (if 'Volunteer Hours (40 hrs)'=Done then 'Yes', If 'Interview'=Passed then 'Yes').
I really appreciate your help.
DATA have;
INFILE cards DSD missover;
INPUT Student_ID 1-3 Name $ 7-13 Group_Name $ 17-34 Course_ID $ 37-43 Academic_Year $50-58 Credit 62-64
Grade $ 66-72 This_Year 73-75 Total_Required 77-78 Group_Type $ 81-104;
LABEL Student_ID="Student ID"
Course_ID="Course ID"
Academic_Year="Academic Year"
This_Year="This Year"
Total_Required="Total Required"
Group_Name="Group Name"
Group_Type="Group Type";
DATALINES;
101 Michael English Eng1 2014-2015 1 80 1 4 Compulsory Credits
101 Michael English Eng2 2013-2014 1 89 4 Compulsory Credits
101 Michael History Hist1 2014-2015 1 88 1 Compulsory Credits
101 Michael English Eng3 2012-2013 1 89 Compulsory Credits
101 Michael Optional Sci2 2014-2015 .5 92 .5 3 Optional Credits
101 Michael Optional CHIV 2014-2015 .25 92 .25 3 Optional Credits
101 Michael Optional SSCV 2014-2015 1 92 1 3 Optional Credits
101 Michael Science Sci1 2013-2014 1 86 2 Compulsory Credits
101 Michael Geography Geog1 2014-2015 1 88 1 Compulsory Credits
101 Michael Group1 French1 2013-2014 1 86 1 Compulsory Credits
101 Michael Group2 Human1 2013-2014 1 86 1 Compulsory Credits
101 Michael Physical Education HPE1 2014-2015 1 88 1 Compulsory Credits
101 Michael Math Math1 2014-2015 1 89 1 2 Compulsory Credits
101 Michael INTERVIEW Int 2014-2015 0 Passeed0 0 Interview
101 Michael VOL_HOUR Vol 2014-2015 0 Done 0 0 Volunteer Hours (40 hrs)
102 John Science Sci2 2014-2015 .5 70 .5 2 Compulsory Credits
102 John Science Sci1 2014-2015 .5 60 .5 2 Compulsory Credits
102 John Math Math1 2013-2014 1 78 2 Compulsory Credits
102 John Math Math2 2013-2014 1 80 2 Compulsory Credits
102 John INTERVIEW Int 2014-2015 0 Passeed0 0 Interview
102 John Optional Env1 2013-2014 1 82 3 Optional Credits
102 John Group1 Human1 2013-2014 1 78 1 Compulsory Credits
102 John History Hist1 2014-2015 1 88 4 Compulsory Credits
101 John VOL_HOUR Vol 2014-2015 0 Done 0 0 Volunteer Hours (40 hrs)
102 John English Eng1 2014-2015 1 80 1 4 Compulsory Credits
102 John Group2 ESL 2012-2013 1 88 1 Compulsory Credits
102 John English Eng2 2012-2013 1 82 4 Compulsory Credits
;
RUN;
data have;
LABEL Student_ID="Student ID";
set have(rename=(student_id=id));
student_id=put(id,8. -r);
drop id;
run;
OPTIONS NODATE pageno=1;
PROC REPORT DATA=have nowd nofs HEADLINE HEADSKIP /*nofs is used to turn off the procedure’s interactive features*/
OUT=reportout;
TITLE1 "Completion of Requirements for Graduation 2015/16";
TITLE2 "Report Period: Final";
TITLE3 j=r "Date: %sysfunc(today(),worddate.)";
COLUMN student_id Group_Type Group_Name Total_Required This_Year Credit;
DEFINE student_id / GROUP WIDTH=12 style={just=r};
DEFINE Group_Type / GROUP WIDTH=20 "Group Type";
DEFINE Group_Name / GROUP WIDTH=9;
DEFINE Total_Required / GROUP WIDTH=9;
DEFINE This_Year / FORMAT=4.2 WIDTH=9 "Earned This Year";;
DEFINE Credit / FORMAT=4.2 WIDTH=9 "Earned to Date";;
compute after student_id;
Student_ID='TOTAL';
endcomp;
BREAK AFTER Student_ID / ol SUMMARIZE page suppress style=[font_weight=bold];;
RUN;
... View more