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;

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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