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

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

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 .

View solution in original post

4 REPLIES 4
Ksharp
Super User

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

compute _page_ ;

line  "Continue... "  ;

endcomp;

Xia Keshan

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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;

Ksharp
Super User

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 .

mohamed_zaki
Barite | Level 11

Check

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

in this doc:http://www.sascommunity.org/seugi/SEUGI2000/trenery_havingtheproc.pdf

If it may help

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
  • 4 replies
  • 545 views
  • 0 likes
  • 4 in conversation