The SAS Output Delivery System and reporting techniques

Proc Report 'page x of y' together with PAGE option

Reply
N/A
Posts: 0

Proc Report 'page x of y' together with PAGE option

Hi,
I'm creating listings of clinical datasets using Proc Report to RTF. I can control the vertical pagination of the colums with the PAGE option, but how can I number pages and count total pages since each row/obs will now span multiple pages? Any Suggestions would be appreciated.
SAS Super FREQ
Posts: 8,866

Re: Proc Report 'page x of y' together with PAGE option

Posted in reply to deleted_user
Hi:
In SAS 9.1, ODS RTF does not do vertical measurement -- so the control for the page break behavior is left to Word. One person could open the report, set one set of margins and they would see different page numbering than another person who opened the report and set different margins.

In SAS 9.2, a new type of RTF -- "measured" RTF -- does do vertical measurement and so page breaks inserted by SAS should be respected. So, for example, using TAGSETS.RTF in SAS 9.2 should get you consistent page breaking results (or more consistent than was previously possible with SAS 9.1).

However, numbering pages in page x of y fashion has been possible since SAS 8.2. Consider the followng code. It puts page x of y page numbering in a title and in a footnote.

cynthia

[pre]
options nodate nonumber center;
ods listing close;

ods rtf file='use_pageof.rtf';
ods escapechar='^';

proc report data=sashelp.prdsale nowd;
title j=r '^{pageof}';
footnote j=c 'Page ^{thispage} of ^{lastpage}';

column country division prodtype actual predict;
define country / group;
define division / group;
define prodtype / group;
define actual / mean 'Avg Actual';
define predict / mean 'Avg Predict';

break after country / page;
run;

ods rtf close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 192 views
  • 0 likes
  • 2 in conversation