BookmarkSubscribeRSS Feed
mnithinshetty
Obsidian | Level 7

Hi,

I am generating multiple page graphs. One page graph for each subject like wise I have 100+ page graph output. I am using below codes to present titles and footnote by controlling them startpage=Yes/now option. Now I am facing unique problem where tilte and footnote appearing correctly in first page but second page onwards I am getting one space before the footnote. Please see the attached where I highlighted in rec box. Could you please guide me how do I remove these space second page onwards.

 

Here is the code I used:-

 


ods listing close;
options nobyline nodate nonumber orientation=landscape papersize=LETTER;
ods escapechar='^';
ods path template.customtemp sasuser.templat(read) sashelp.tmplmst(read) ;
ods path(prepend) work.templat;

ods rtf file = "&base2/tfl/prod/figures/&tflno..rtf" NOGTITLE NOGFOOTNOTE ;

options mprint mlogic;
%macro grp;

%do i=1 %to 3;

data _null_;
set chk(where =(ord=&i.));
by subjid;
call symputx("subj"||left(put(&i,3.)),strip(subjid));
call symputx("trt"||left(put(&i,3.)),strip(trt02a));
run;

options nonumber nodate orientation=landscape center;

ods graphics / reset width=9.8in height=5.0in ;


ods rtf startpage=now;


ods rtf text="(*ESC*)S={outputwidth=100% just=c}{&ttl1}";
ods rtf text="(*ESC*)S={outputwidth=100% just=c}{&ttl2. &popttl}";
/* ods rtf text="(*ESC*)S={outputwidth=100% just=c} {}"; */

title1 h=8pt j=l "&__sponsor.";
title2 h=8pt j=l "&__protocol." ;


proc sgplot data=outdata(where=(ord=&i.)) dattrmap=zattrs pad=12%;
scatter x=ady y=mean / /*yerrorupper=high yerrorlower=low*/
group=prm groupdisplay=cluster clusterwidth=0.5 attrid=myid ;
series x=ady y=mean / group=prm groupdisplay=cluster clusterwidth=0.5 attrid=myid name='s' markers ;
series x=ady y=mean / markerattrs=(size=0) x2axis;
xaxis label="Visit" type=linear values=( &xaxis. ) offsetmin=0.10 ;
yaxis label="Biochemistry" values=(&yaxis.)
offsetmin=0.14 offsetmax=0.02;
x2axis label="Subject=&&subj&i &&trt&i" display=(noline noticks novalues);
keylegend 's' / border location=inside position=topright across=1;
run;

ods rtf text="(*ESC*)S={outputwidth=100% just=l color=black}{&fnn1}";
ods rtf text="(*ESC*)S={outputwidth=100% just=l color=black}{&fnn2}";
ods rtf text="(*ESC*)S={outputwidth=100% just=l color=black}{}";
ods rtf text="(*ESC*)S={outputwidth=100% just=l color=black}Program Run: &sysdate &systime Output Name: &tflno..rtf Page &i. of %left(&maxpg.)";

ods rtf startpage=off;

%end;
%mend;

%grp;

ods rtf close;
ods _all_ close;

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 656 views
  • 0 likes
  • 1 in conversation