ods rtf file='D:\new\testing.rtf' ;
proc report data=sashelp.cars nowd style=[rules=none] ;
column origin make type msrp ;
define origin /order id;
break after origin/page ;
by origin ;
run;
ods rtf close ;
in testing file observe last page . Last page two records related but the origin column showing empty.
So the order variable value should be print page start
RTF (and HTML) do not really create pages. Did you try directing it to an ODS destination that actually supports pages, like a PDF file or plain old text listing output.
Does it still not replicate the current value of ORIGIN on the new second page of a value that requires more than one page?
From the documentation regarding Order Variables in Proc Report in the Concepts section 'Laying Out a Report":
PROC REPORT does not repeat the value of an order variable from one row to the next if the value does not change,
So what you want apparently does not match the role of an order variable.
Do you need to use PROC REPORT? Can you just use PROC PRINT?
data have ;
origin=1;
do row=1 to 5; output; end;
origin=2 ;
do row=1 to 100; output; end;
origin=3 ;
do row=1 to 5; output; end;
run;
proc print data=have;
by origin;
id origin;
pageby origin;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
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.