The below code generates the attached pdf, however on page 2 the students and gender graphics should only appear at the first occurrence of them on page 2. For some reason they are repeated in the second set rather than the charts that should be there, being there. The output looks ok in the results viewer on EG, just not the actual PDF. Tips?
ods graphics / reset=all; /********* SECTION 1 *********/ ods layout gridded rows = 1 columns = 2; ods region row = 1 column = 1; ods escapechar='~'; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT="~{style[preimage='\\mcc-data\iedata\Projects\High School Reports\LOGOS\&ASCHOOL._MCC.jpg?height=4.75cm&width=12CM']} "; ods region row = 1 column = 2; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT="~S={FONTSIZE=16pt}&SCHOOL."; ODS TEXT=" "; ODS TEXT="~S={FONTSIZE=16pt}High School Report"; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ods layout end; /********* ROW 2 OF SECTION 1 *********/ ods layout gridded rows = 1 columns = 3 columnGutter = 0.25in; ods region row = 2 column = 1; /* ENROLLMENT TREND */ ODS TEXT=" ________________________________"; ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}FTIC Fall 2017 Demographics"; PROC PRINT DATA=WORK.HS_COMP_FTIC_SEX_&ASCHOOL. NOOBS LABEL; VAR SEX HS_COUNT FTIC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL SEX = "00"X HS_COUNT = "&SCHOOL." FTIC_COUNT = 'FTIC'; FORMAT SEX $GENDER.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_FTIC_ETHNIC_&ASCHOOL. NOOBS LABEL; VAR ETHNIC / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT FTIC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL ETHNIC = "00"X HS_COUNT = "&SCHOOL." FTIC_COUNT = 'FTIC'; FORMAT ETHNIC ETHNIC.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_FTIC_FTPT_&ASCHOOL. NOOBS LABEL; VAR FTPT / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT FTIC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL FTPT = "00"X HS_COUNT = "&SCHOOL." FTIC_COUNT = 'FTIC'; FORMAT FTPT FTPT.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_FTIC_PELL_&ASCHOOL. NOOBS LABEL; VAR PELL / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT FTIC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL PELL = "00"X HS_COUNT = "&SCHOOL." FTIC_COUNT = 'FTIC'; FORMAT PELL PELL.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_FTIC_MJRTYPE_&ASCHOOL. NOOBS LABEL; VAR MJRTYPE / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT FTIC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL MJRTYPE = "00"X HS_COUNT = "&SCHOOL." FTIC_COUNT = 'FTIC'; FORMAT MJRTYPE $DEGMJR.; RUN; /***********/ /***********/ ODS TEXT="________________________________"; ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Top 5 &SCHOOL. FTIC Majors"; PROC PRINT DATA=WORK.HS_MAJOR_FREQ_&ASCHOOL. LABEL NOOBS; VAR DESC / STYLE = [CELLWIDTH = 2.25IN] STYLE(DATA) = [JUST=C]; LABEL DESC = '00'X; RUN; /***********/ /***********/ ODS TEXT= "~S={FONTSIZE=8pt}Fall 2017 Currently Dual Credit"; PROC PRINT DATA=WORK.HS_COMP_ALL_DC_&ASCHOOL. NOOBS LABEL; VAR CURRENT_DC / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL CURRENT_DC = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT CURRENT_DC CURRENT_DC.; RUN; /***********/ /***********/ ODS TEXT= "~S={FONTSIZE=8pt}Percent of Developmental Needs"; PROC PRINT DATA=WORK.DEV_NEEDS_NUM_FTIC_&ASCHOOL. NOOBS LABEL; VAR num_remedial_needs / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_DEV_NEED_PER ALL_DEV_NEED_PER / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL num_remedial_needs = "00"X HS_DEV_NEED_PER = "&SCHOOL." ALL_DEV_NEED_PER = 'FTIC'; FORMAT num_remedial_needs DEV_NEEDS. HS_DEV_NEED_PER ALL_DEV_NEED_PER PCTFMT.; RUN; /***************************/ /***************************/ /***** COLUMN 2 ******/ /***************************/ /***************************/ ods region row = 2 column = 2; ODS TEXT="________________________________"; ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Overall Fall 2017 Demographics"; PROC PRINT DATA=WORK.HS_COMP_ALL_SEX_&ASCHOOL. NOOBS LABEL; VAR SEX HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL SEX = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT SEX $GENDER.; RUN; /***********/ /***********/; PROC PRINT DATA=WORK.HS_COMP_ALL_ETHNIC_&ASCHOOL. NOOBS LABEL; VAR ETHNIC / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL ETHNIC = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT ETHNIC ETHNIC.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_ALL_FTPT_&ASCHOOL. NOOBS LABEL; VAR FTPT / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL FTPT = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT FTPT FTPT.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_ALL_PELL_&ASCHOOL. NOOBS LABEL; VAR PELL / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL PELL = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT PELL PELL.; RUN; /***********/ /***********/ PROC PRINT DATA=WORK.HS_COMP_ALL_MJRTYPE_&ASCHOOL. NOOBS LABEL; VAR MJRTYPE / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL MJRTYPE = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT MJRTYPE $DEGMJR.; RUN; /***********/ /***********/ ODS TEXT="________________________________"; ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Top 5 MCC FTIC Majors"; PROC PRINT DATA=WORK.HS_FTIC_MAJOR_FREQ_&ASCHOOL. LABEL NOOBS; VAR DESC / STYLE = [CELLWIDTH = 2.25IN] STYLE(DATA) = [JUST=C]; LABEL DESC = '00'X; RUN; /***********/ /***********/ ODS TEXT= "~S={FONTSIZE=8pt}Fall 2017 Previously Dual Credit"; PROC PRINT DATA=WORK.HS_COMP_ALL_PDC_&ASCHOOL. NOOBS LABEL; VAR DUALCREDIT / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_COUNT MCC_COUNT / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL DUALCREDIT = "00"X HS_COUNT = "&SCHOOL." MCC_COUNT = 'MCC'; FORMAT DUALCREDIT PREVIOUS_DC.; RUN; /***********/ /***********/ ODS TEXT= "~S={FONTSIZE=8pt}Developmental Need Area"; PROC PRINT DATA=WORK.DEV_NEEDS_AREA_FTIC_&ASCHOOL. NOOBS LABEL; VAR DEV_NEED_AREA / STYLE = [CELLWIDTH = .8IN] STYLE(DATA) = [JUST=C]; VAR HS_DEV_AREA ALL_DEV_AREA / STYLE = [CELLWIDTH = .75IN] STYLE(DATA) = [JUST=C]; LABEL DEV_NEED_AREA = "00"X HS_DEV_AREA = "&SCHOOL." ALL_DEV_AREA = 'FTIC'; FORMAT DEV_NEED_AREA $DEV_NEED_AREA.; RUN; /***************************/ /***************************/ /***** COLUMN 3 ******/ /***************************/ /***************************/ ODS TEXT=" "; ODS TEXT=" "; ods region row = 2 column = 3; ODS TEXT="________________________________"; ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Retention Rates"; PROC PRINT DATA=WORK.RET_TREND_TABLE_FIN_&ASCHOOL. NOOBS LABEL; VAR RET_YEAR / STYLE = [CELLWIDTH = 1IN] STYLE(DATA) = [JUST=C]; VAR RETENTION_RATE OVERALLHS_RETENTION_RATE FTIC_RETENTION_RATE / STYLE = [CELLWIDTH = .6IN] STYLE(DATA) = [JUST=C]; LABEL RET_YEAR = '00'X RETENTION_RATE = "&SCHOOL." OVERALLHS_RETENTION_RATE = 'Area High Schools' FTIC_RETENTION_RATE = 'FTIC'; FORMAT RET_YEAR RET_YEAR. RETENTION_RATE OVERALLHS_RETENTION_RATE FTIC_RETENTION_RATE PCTFMT.; RUN; /***********/ /***********/ ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Top 10 Degree Majors"; ODS TEXT= "~S={FONTSIZE=8pt}Within 4 Years"; PROC PRINT DATA=WORK.TOPMAJORS_&ASCHOOL. LABEL NOOBS; VAR MAJOR_DESC / STYLE = [CELLWIDTH = 2.75IN] STYLE(DATA) = [JUST=C]; LABEL MAJOR_DESC = '00'X; RUN; /***********/ /***********/ ODS TEXT=" "; ODS TEXT= "~S={FONTSIZE=8pt}Top 10 Transfer Institutions"; ODS TEXT= "~S={FONTSIZE=8pt}Within 5 Years"; PROC PRINT DATA=WORK.GRADS_TRANS_5YRS_&ASCHOOL. LABEL NOOBS; VAR COLLEGE / STYLE = [CELLWIDTH = 2.25IN] STYLE(DATA) = [JUST=C]; VAR COUNT / STYLE = [CELLWIDTH = .5IN] STYLE(DATA) = [JUST=C]; LABEL COLLEGE = '00'X COUNT = '00'X; RUN; /***********/ /***********/ ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT=" "; ODS TEXT="~S={FONTSIZE=6pt}To view the full report please visit:"; ODS TEXT="~S={FONTSIZE=6pt URL='http://mcciep.mclennan.edu/home/reports'} ~{style [color=blue fontsize=6pt textdecoration=underline]http://mcciep.mclennan.edu/home/reports/}"; ODS TEXT="~S={FONTSIZE=6pt}and select High School Reports."; ODS TEXT="~S={FONTSIZE=6pt}Generated by the Office of Institutional Research"; ODS TEXT="~S={FONTSIZE=6pt}at McLennan Community College on %TRIM(%QSYSFUNC(DATE(), NLDATE20.))"; /***********/ /***********/ ods layout end; /****** END PAGE 1 ********/ /********************/ /*******************/ /********************/ /*******************/ /****** START PAGE 2 ********/ ods startpage=now; /********* SECTION 1 *********/ ODS TEXT=" "; ODS TEXT="~S={FONTSIZE=16pt}5-Year Fall Trends"; ods layout gridded columns = 2 columnGutter = 0.25in; ods region; /***********/ /***********/ goptions reset=all hsize=10cm vsize=6cm; /* ENROLLMENT */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('Students'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 25 50 75 100 125 150 175 200) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_ENROLLMENT_HS_&ASCHOOL. NOCACHE ; PLOT COUNT * YEAR / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; ods region; /***********/ /***********/ /* GENDER */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; SYMBOL2 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DIAMONDFILLED CV=MAROON LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('Male' 'Female'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 20 40 60 80 100) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_GENDER_&ASCHOOL. NOCACHE ; PLOT GENDER_1 * yearofHSGraduation GENDER_2 * yearofHSGraduation / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; ods layout end; /***********/ /***********/ ods pdf startpage=no; /* ETHINIC */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; SYMBOL2 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DIAMONDFILLED CV=MAROON LINE=1 WIDTH=2; SYMBOL3 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DOT CV=GREEN LINE=1 WIDTH=2; SYMBOL4 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=TRIANGLEFILLED CV=ORANGE LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('White' 'African-American' 'Hispanic' 'Other'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 20 40 60 80 100) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_ETHNIC_&ASCHOOL. NOCACHE ; PLOT ETHNIC_1 * yearofHSGraduation ETHNIC_2 * yearofHSGraduation ETHNIC_3 * yearofHSGraduation ETHNIC_4 * yearofHSGraduation / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; /***********/ /***********/ ods pdf startpage=no; ods layout gridded rows = 1 columns = 2 columnGutter = 0.25in; ods region; /* MAJOR TYPE */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; SYMBOL2 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DIAMONDFILLED CV=MAROON LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('Academic' 'Workforce'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 20 40 60 80 100) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_MJRTYPE_&ASCHOOL. NOCACHE ; PLOT MJRTYPE_1 * yearofHSGraduation MJRTYPE_2 * yearofHSGraduation / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; /***********/ /***********/ ods region; /* PELL STATUS */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; SYMBOL2 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DIAMONDFILLED CV=MAROON LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('Pell Status' 'Non Pell Status'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 20 40 60 80 100) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_PELL_&ASCHOOL. NOCACHE ; PLOT PELL_1 * yearofHSGraduation PELL_2 * yearofHSGraduation / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; ods layout end; /***********/ /***********/ ods pdf startpage=no; /* DEVELOPMENTAL NEEDS */ SYMBOL1 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=SQUAREFILLED CV=CX000080 LINE=1 WIDTH=2; SYMBOL2 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DIAMONDFILLED CV=MAROON LINE=1 WIDTH=2; SYMBOL3 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=DOT CV=GREEN LINE=1 WIDTH=2; SYMBOL4 INTERPOL=JOIN POINTLABEL HEIGHT=10pt VALUE=TRIANGLEFILLED CV=ORANGE LINE=1 WIDTH=2; Legend1 FRAME LABEL=NONE VALUE=('No Dev Needs' '1 Dev Need' '2 Dev Needs' '3 Dev Needs'); Axis1 STYLE=1 WIDTH=1 LABEL=NONE ORDER=(0 20 40 60 80 100) MINOR=NONE; Axis2 STYLE=1 WIDTH=1 LABEL=NONE MINOR=NONE; PROC GPLOT DATA = WORK.SUM_DEVNEEDS_&ASCHOOL. NOCACHE ; PLOT DEVNEEDS_0 * yearofHSGraduation DEVNEEDS_1 * yearofHSGraduation DEVNEEDS_2 * yearofHSGraduation DEVNEEDS_3 * yearofHSGraduation / OVERLAY VAXIS=AXIS1 HAXIS=AXIS2 FRAME LEGEND=LEGEND1; RUN; QUIT; /****** END PAGE 2 ********/ ods graphics off; ods pdf close; %mend; %symdel highschool; %highschool(Axtell, AHS);
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.