BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Konstantin123
Fluorite | Level 6

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)

1 ACCEPTED SOLUTION
2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 899 views
  • 0 likes
  • 3 in conversation