02-02-2018 02:41 PM
I am trying to force page breaks but the ods rtf startpage= now statement doesn't seem to be working. This is a simplified version of my code:
ods rtf file = "hello.rtf" style= styles.hello startpage= yes; *(tried =on too); ods escapechar = '^'; options nodate nonumber; ods rtf text= "hello &hello."; ods rtf startpage= now; ods rtf text= "hello &hello."; ods rtf close;
Everything is on the same page in the output rtf.
Probably I'm doing something stupid but would appreciate if someone can point it out.
02-02-2018 03:17 PM
ODS TEXT statements don't get processed until they encounter a run or quit so that's likely your issue - with your test, not the functionality of STARTPAGE. Try doing this with PROC PRINT instead.
%let hello = Reeza; ods rtf file = "hello.rtf" style=meadow startpage=no; *(tried =on too); ods escapechar = '^'; options nodate nonumber; ods rtf text= "hello &hello."; proc print data=sashelp.class; run; ods rtf startpage= now; ods rtf text= "hello &hello."; proc print data=sashelp.air (obs=10); run; ods rtf close;
02-02-2018 06:53 PM
02-02-2018 07:29 PM
02-08-2018 06:26 PM
This code works as expected, tried with a blank dataset. I guess I can use this as a workaround by trying to make the dataset invisible, if that's possible. Will keep fiddling and update here.
02-02-2018 06:17 PM
You might want to investigate using Proc ODSTEXT instead of ODS RTF Text. The output doesn't depend quite so much on another procedure creating ODS output as ODS RTF TEXT seems to.
Need further help from the community? Please ask a new question.