DATA Step, Macro, Functions and more

proc report (break across pages)

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

proc report (break across pages)

I have output (proc report):
1obs     1 First_row
             2 Second_row
             3 Third_row

2obs     1 First_row
             2 Second_row
             3 Third_row

 .
.

nobs    1 First_row

             2 Second_row
             3 Third_row
It is necessary to take measures to three  lines with the data of one observation does not break across pages.
(options linesize=90 pagesize=40)


Accepted Solutions
Solution
‎04-06-2016 12:59 PM
Super User
Posts: 10,028

Re: proc report (break across pages)

Posted in reply to Konstantin123

All Replies
Super User
Super User
Posts: 7,955

Re: proc report (break across pages)

Posted in reply to Konstantin123

If your question is how to put a page break in at a set point of your output, then the simple answer is this.  Have a datastep before the report procedure, that processes your data and adds a page variable in.  Then break on that page variable, e.g.:

data have;
  set have;
  if _n_ <= 9 then pge=1;  /* First 9 observations, based on 2 per section */
  else pge=2;  /* the other 9 */
run;

proc report data=have;
  columns _all_;
  define pge / noprint order;
  define...;
  
  break after pge / page;
run;
Solution
‎04-06-2016 12:59 PM
Super User
Posts: 10,028

Re: proc report (break across pages)

Posted in reply to Konstantin123
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 230 views
  • 0 likes
  • 3 in conversation