BookmarkSubscribeRSS Feed
HitmonTran
Pyrite | Level 9

Hi,

 

I need to do a page break for "Days/week at workplace".

 

current output:

HitmonTran_0-1611287459333.png

 

data:

HitmonTran_1-1611287593430.png

 

 

code:

  proc report data=final nowindows center headline headskip missing split='|';
    column   ord1 ord2    desc ;
    define ord1      / order order=internal noprint;
    define ord2      / order order=internal noprint;
    define desc     / display " " style(column)={asis=on just=left cellwidth=2 in} flow style(header)={just=left font_size=9pt};
   
    break after ord1 / skip;
    compute before ord1 / style(lines)={font_size = 3pt};
      line " "; 
    endcomp; 
  run;
2 REPLIES 2
Ksharp
Super User
data cars;
set sashelp.cars;
keep _character_;
run;
proc sql;
create table have as
select *,count(*) as n
 from cars
  group by make;
quit;
data have;
 set have;
 by make;
 if first.make then do;
   cum+n;
   if cum>30 then do;p+1;cum=n;end;    /*a page have 30 rows*/
 end;
 drop cum n;
run;

ods rtf file='c:\temp\x.rtf' style=journal;
proc report data=have nowd;
column _all_;
define p/group noprint;
break after p/page;
run;
ods rtf close;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1062 views
  • 0 likes
  • 2 in conversation