Hello,
I am trying to break pages by "trtx" but it's not breaking. Please help, thank you.
output:
code:
proc sort data= final;
by trtx usubjid ;
run;
ods listing close;
ods rtf file = "output.rtf" startpage=no style= TLF_CN_9;
options symbolgen nobyline orientation=landscape;
title1 j=l "Randomized Treatment: #byval1";
proc report data = final nowd headline headskip missing split='@' style(header column)=[protectspecialchars=off];
by trtx;
columns trtx col: ;
define trtx/order noprint;
define col1 /display style(header)=[just=left] style(column)=[asis=on cellwidth=1.4 in ] flow "Subject ID/ Age/Race/Sex";
define col2 /display style(header)=[just=left] style(column)=[asis=on cellwidth=.5 in ] flow "Completed@Study";
define col3 /display style(header)=[just=left] style(column)=[asis=on cellwidth=.7 in ] flow "Visit";
define col4 /display style(header)=[just=left] style(column)=[asis=on cellwidth=.9 in ] flow "Date of@Discontinuation@(Day)";
define col5 /display style(header)=[just=left] style(column)=[asis=on cellwidth=.9 in ] flow "Date of@Last Dose@of IP@(Day)";
define col6 /display style(header)=[just=left] style(column)=[asis=on cellwidth=2 in ] flow "Primary Reason for Discontinuation from Study";
break after trtx/ page;
run;
ods rtf close;
ods listing;
sample data:
trtx | subjid | col1 | col2 | col3 | col4 | col5 | col6 |
1 | 12 | 1901-2012/74/W/M | no | Day 0 | 2021-01-15 (28) | 2020-12-18 (0) | WITHDRAWAL BY SUBJECT |
1 | 13 | 1901-2013/74/W/M | no | Day 28 | 2021-01-15 (28) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
1 | 14 | 1901-2014/74/W/M | yes | Day 0 | 2021-09-10 (262) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
1 | 15 | 1901-2015/74/W/M | yes | Day 28 | 2021-09-10 (262) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
2 | 22 | 1901-2022/74/W/M | no | Day 0 | 2021-01-15 (28) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
2 | 23 | 1901-2023/74/W/M | no | Day 28 | 2021-01-15 (28) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
2 | 24 | 1901-2024/74/W/M | yes | Day 0 | 2021-09-10 (262) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
2 | 25 | 1901-2025/74/W/M | yes | Day 28 | 2021-09-10 (262) | 2021-02-08 (28) | WITHDRAWAL BY SUBJECT |
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.