HI,
Is there a way to insert a blank page in my report? I tried using the pagebreaks but does not seem to work. Also, is there a way I can customize page numbers? eg. I want the page number as Page1-Comments.
Thanks.
Hi
You can use the option STARTPAGE= with your ODS RTF statement to control when new pages are created.
There is a way to create empty pages using the Report Writing Interface.
To add text to the page numbering, you need to define your own style.
See code below for an example:
ods path
(prepend) work.mytemplates (update)
;
proc template;
define style myrtf;
parent=styles.rtf;
class PageNo /
pretext="Page "
posttext=" Comments"
;
end;
run;
ods rtf file="c:\temp\sample.rtf" startpage=never style=myrtf ;
title "page1";
proc print data=sashelp.class;
run;
title;
ods rtf startpage=now;
*
* tell SAS we create a table, needed so that page gets created
* will generate a warning
*;
data _null_;
declare odsout xods();
xods.table_start();
xods.table_end();
run;
ods rtf startpage=now;
title "page3";
proc sgplot data=sashelp.class;
vbar age;
run;
title;
ods rtf close;
Bruno
Hi
You can use the option STARTPAGE= with your ODS RTF statement to control when new pages are created.
There is a way to create empty pages using the Report Writing Interface.
To add text to the page numbering, you need to define your own style.
See code below for an example:
ods path
(prepend) work.mytemplates (update)
;
proc template;
define style myrtf;
parent=styles.rtf;
class PageNo /
pretext="Page "
posttext=" Comments"
;
end;
run;
ods rtf file="c:\temp\sample.rtf" startpage=never style=myrtf ;
title "page1";
proc print data=sashelp.class;
run;
title;
ods rtf startpage=now;
*
* tell SAS we create a table, needed so that page gets created
* will generate a warning
*;
data _null_;
declare odsout xods();
xods.table_start();
xods.table_end();
run;
ods rtf startpage=now;
title "page3";
proc sgplot data=sashelp.class;
vbar age;
run;
title;
ods rtf close;
Bruno
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.