The SAS Output Delivery System and reporting techniques

Remove space between title and proc report in ODS PDF

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

Remove space between title and proc report in ODS PDF

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...

 

whitespace proc report title.png

 

 

%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;


Accepted Solutions
Solution
‎05-04-2017 10:12 AM
SAS Super FREQ
Posts: 8,867

Re: Remove space between title and proc report in ODS PDF

Hi:
Since you are using absolute layout and your output seems to be more complicated than just one report since you have a loop to place the output, this question might be better answered by Tech Support.

cynthia

View solution in original post


All Replies
Solution
‎05-04-2017 10:12 AM
SAS Super FREQ
Posts: 8,867

Re: Remove space between title and proc report in ODS PDF

Hi:
Since you are using absolute layout and your output seems to be more complicated than just one report since you have a loop to place the output, this question might be better answered by Tech Support.

cynthia
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 291 views
  • 0 likes
  • 2 in conversation