0
votes

I have a question:

The data look like that:

a 1    
a 2    
a 3
a 4
a 5
a 6    
...    
d 1    
d 2
...    
f 1    
f 2    
...

I want break skip after a,b,c,d and break page if the group in column a not fit in one page.

I wish to use proc report to print like this:

 a 1
 a 2
 a 3
 a 4
 a 5

 b 1
 b 2 
 b 3
 b 4
 b 5
 *************************(if a and b can fit in the this page)

 c 1
 c 2
 c 3
 c 4
 c 5
 c 7
 c 8
 **********************(if c can fit in the page but no enough room for 5 rocords in d, so d will goes to next page)

 d 1
 d 2
 d 3
 ...

The question is that when I want to use break after /skip and break after/page, when the skip appears, the break page also appears, so each group of a b c d they are in a different page.

But what I want is if a and b can fit in one page, then break skip after a and b, break page after b. When c and d can not fit in one page, break page after c to make c and d in different pages.

1

1 Answers

0
votes

PROC REPORT cannot predict where a break occurs in a page, because PROC REPORT isn't responsible for pagination - the ODS destination is.

As such, the simplest solution is to determine on your own how many lines fit on a page, create a new variable that stores that (effectively, stores the page number), and break on that (nonprinting) variable.