The SAS Output Delivery System and reporting techniques

to insert pagenumbers x of y, using proc report

Reply
N/A
Posts: 0

to insert pagenumbers x of y, using proc report

How do I insert pagenumbers x of y for multi page report using the proc report procedure.

Thanks,
APS
SAS Super FREQ
Posts: 8,739

Re: to insert pagenumbers x of y, using proc report

Hi:
See Example 2 in this forum posting:
http://support.sas.com/forums/thread.jspa?threadID=1796&tstart=0

It uses ODS ESCAPECHAR.

An afterthought: The Page X of Y technique shown in the above post is a feature of ODS that can be used in a SAS title or SAS footnote statement -- that means you could use the capability with ANY SAS procedure -- not just PROC REPORT.

Here's a different example program that shows using different procs for Page X of Y -- not just PROC REPORT.

cynthia
[pre]
options nodate nonumber;
ods rtf file='c:\temp\pagenum.rtf';
ods pdf file='c:\temp\pagenum.pdf';

ods escapechar='~';

title1 j=r 'Page ~{thispage} of ~{lastpage}';
footnote j=c '--~{thispage}--';

proc freq data=sashelp.shoes;
title2 'Proc Freq';
tables region;
run;

proc means data=sashelp.shoes min mean max;
title2 'Proc Means';
class subsidiary;
var sales;
run;

proc report data=sashelp.shoes nowd;
title2 'Proc Report';
column product sales inventory returns;
define product/group;
rbreak after /summarize;
format sales inventory returns comma14.2;
run;

proc tabulate data=sashelp.shoes f=comma10.;
where region in ('Asia', 'Pacific', 'Canada');
title2 'Proc Tabulate';
class subsidiary product;
var returns;
table subsidiary all,
Returns='Product Returns'*(product=' ' all);
keylabel sum=' '
all='Total';
run;
ods _all_ close;
title;
ods listing;

[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 121 views
  • 0 likes
  • 2 in conversation