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;

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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
  • 1313 views
  • 0 likes
  • 2 in conversation