ods listing close;
ods escapechar='^';
options nodate nonumber pageno=1;
options nodate nonumber papersize = letter orientation=landscape;
ods noptitle;
ods pdf file="&OutDir/&ReportOut..pdf" style=printer notoc /*startpage=never;*/;
goptions hsize=10 in vsize=11 in;/*9 7*/
title j=c 'Mortgage Disaster Impact Analysis'
j=r 'Page ^{thispage} of ^{lastpage}';
title2 justify=center 'Originations Pipeline Impact';
title3 justify= center &wkday. &Date1. &Time1.;
PROC PRINT DATA = FEMA_IMPACT_CUTOFF noobs
style(report)=[background=black cellspacing=10 just=center font_size=9pt font_face="Calibri" bordercolor=black borderwidth=1]
style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]
grandtotal_label='Grand Total';
title j=center 'Originations Pipeline Impact';
by Disaster State ;
sum Indiv_Numb Indiv_Doll Publ_Numb Publ_Doll;
label Indiv_Numb = 'Indiv#s';
label Indiv_Doll = 'Indiv$';
label Publ_Numb = 'Public#s';
label Publ_Doll = 'Public$';
RUN;
ods pdf close;
goptions reset=all;
ods pdf startpage=yes;
ods listing;
run;
As a follow up to this post I inserted the page number logic however I am not getting the page number just the results. This uses a pdf output
Hi:
I'm not sure why you posted this in a 9 year old forum posting. However, you have an issue in your code, which is probably the reason why the "pageof" ESCAPECHAR strings are not working.
also, not sure why you have a GOPTIONS statement. For PDF to change the papersize, you typically use the PAPERSIZE option in an OPTIONS statement.
And, if you are using graph procedures in your production code with page x of y type of formatting, you may want to look at this Tech Support note: http://support.sas.com/kb/33/986.html.which indicates that "pageof" functions may not work with graphics.
cynthia
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.