Please try below code after your PROC TEMPLATE . I edited your code by commenting and replacing with few changes. ods rtf file = "Actual_result.rtf" style = MyStyleRTF; options orientation = landscape; /*ods startpage = yes; */ /*title1 j = r '{Page \field{\*\fldinst { PAGE \\* MERGEFORMAT }}} of {\field{\*\fldinst SECTIONPAGES \* MERGEFORMAT }}';*/ title1 j = r '{Page \field {\*\fldinst PAGE \\*MERGEFORMAT}} {of \field {\*\fldinst NUMPAGES \\*MERGEFORMAT}}'; /*ods rtf sectiondata="\pgnrestart\pgnstarts1";*/ proc report data = sashelp.class; define sex / order; break after sex / page; run; ods rtf close;
... View more