I have seen several solutions for rtf using parskip, but I have not been able to find any solutions for removing the space between the title lines and the result of a proc report in pdf...
%macro report_loop;
data _null_;
a1='\\SERVERNAME\FILELOCATOIN\sasdata\Transcripts\sasData\test_123.pdf';
a1=compress(a1);
call symput('attachment',a1);
run;
%put attachment=&attachment;
ods pdf file="&attachment"
uniform
notoc
nobookmarkgen
bookmarklist=hide
author="Jose Cuevas"
dpi=300;
ods layout absolute x=0.00cm y=0.00cm;
/* only one label per page*/
ods proclabel="&dcps_student_id";
%dcps_logo;
ods region x=3.00cm y=1.00cm;
ods pdf text ="^S={font_size=14pt font_face=Calibri color=grey just=l}Duval County Public Schools Transcript";
OPTIONS NOBYLINE mlogic;
%let i=0;
%do i=1 %to &max_terms;
data _null_;
p=&i;
%let i=&i;
%let even_odd=%sysfunc(mod(&i,2));
%if &even_odd=1 %then %let left=1.00;
%if &even_odd=0 %then %let left=10.0;
%if &i=1 %then %let down=2.00;
%if &i=2 %then %let down=2.00;
%if &i=3 %then %let down=7.00;
%if &i=4 %then %let down=7.00;
%if &i=5 %then %let down=12.0;
%if &i=6 %then %let down=12.0;
%if &i=7 %then %let down=17.0;
%if &i=8 %then %let down=17.0;
run;
ods region x=&left.cm y=&down.cm;
proc report data=work.transcript_report split='~' headline headskip
style(header)={font_face=Helvetica font_size=4pt height=5pt just=c vjust=c background=lightgrey font_weight=bold };
column (('Grade' grade_level)
('Course' course_number course_name )
(score)
('Credits' credits_attempted credits_earned ));
where term_number = &i;
by school_year term_code term_gpa term_gpa_weighted cum_gpa cum_gpa_weighted;
define grade_level / display 'Level' style={ cellheight=0.1cm cellspacing=0 just=c vjust=c font_face="Helvetica" fontsize=4pt } ;
define course_number / display 'Number' style={ cellheight=0.1cm cellspacing=0 just=c vjust=c font_face="Helvetica" fontsize=4pt } ;
define course_name / display 'Name' style={ cellheight=0.1cm cellspacing=0 just=l vjust=c font_face="Helvetica" fontsize=4pt } ;
define score / display 'Score' style={ cellheight=0.1cm cellspacing=0 just=c vjust=c font_face="Helvetica" fontsize=4pt } ;
define credits_attempted / display 'Attempted' style={ cellheight=0.1cm cellspacing=0 just=c vjust=c font_face="Helvetica" fontsize=4pt } ;
define credits_earned / display 'Earned' style={ cellheight=0.1cm cellspacing=0 just=c vjust=c font_face="Helvetica" fontsize=4pt } ;
title1 height=6pt bold lspace=1pt 'School Year: #BYVAL(school_year) Term: #BYVAL(term_code)';
title2 height=6pt bold lspace=1pt 'Term GPA: #BYVAL(term_gpa) Term GPA (weighted): #BYVAL(term_gpa_weighted)';
title3 height=6pt bold lspace=1pt 'Cumulative GPA: #BYVAL(cum_gpa) Cumulative GPA (weighted): #BYVAL(Cum_gpa_weighted)';
run;
title1;
title2;
title3;
%end;
OPTIONS BYLINE;
ods pdf nobookmarkgen; /* this removes the -content or index- rendering once pdf is created */
ods layout end;
ods _all_ close;
ods listing;
%mend report_loop;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.