BookmarkSubscribeRSS Feed
thanikondharish
Fluorite | Level 6

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

3 REPLIES 3
Tom
Super User Tom
Super User

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?

ballardw
Super User

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.

 

 

Tom
Super User Tom
Super User

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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 3 replies
  • 1017 views
  • 0 likes
  • 3 in conversation