## Page Gap and Compute

Solved
Occasional Contributor
Posts: 5

# Page Gap and Compute

I have next structure in my table: Name / subname.

I need next thing in proc report: if column transfer to the next page then I need to write (Name || " (continued)") on the next page. E.g.:

Something

111

222

333

*page gap*

Something (continued)

444

555

666

Probably it can be done by compute block, but I don't know how. Please help me to solve it.

Accepted Solutions
Solution
‎09-24-2014 07:56 AM
Super User
Posts: 10,787

## Re: Page Gap and Compute

LINE statement is global statement, you can't execute it conditionally as you did. But you can use format \$varying200. to get the same thing .

All Replies
Super User
Posts: 10,787

## Re: Page Gap and Compute

Why not print  "Continue... "     at the beginning of every page ??

compute _page_ ;

line  "Continue... "  ;

endcomp;

Xia Keshan

Super User
Posts: 9,599

## Re: Page Gap and Compute

Problem then is if you have multiple groups.  What you could do is assign a page no in your data based on your formula  (note not exact syntax, just poping this out there theoretically):

data want;

set have;

pgno=floor(_n_ / 20) + 1;  /* 20 obs per page */

run;

proc report...

compute before pgno / break;

if pgno > 1 then do;

line "Continue";

end;

endcomp;

run;

Solution
‎09-24-2014 07:56 AM
Super User
Posts: 10,787

## Re: Page Gap and Compute

LINE statement is global statement, you can't execute it conditionally as you did. But you can use format \$varying200. to get the same thing .

Super Contributor
Posts: 490

## Re: Page Gap and Compute

Check

Item 52: The ability to print the word 'CONTINUED' when a report spans pages and to print 'END' on the last page.

If it may help

🔒 This topic is solved and locked.

Discussion stats
• 4 replies
• 229 views
• 0 likes
• 4 in conversation