Hi all!
I just wanted to add pageborders in the output.
Something like this:
Here is the code:
ods RTF startpage=no file="c:\sas\sas.docx" NOGTITLE NOGFOOTNOTE style=word;
options nonumber nodate;
title PAGE BORDER;
footnote;
ODS RTF startpage=now TEXT="{\pard\b\qc {PAGE1} \par}"; RUN;
proc odstext;
p "REPORT:" /style=[fontweight=bold textalign=c fontsize=20pt fontfamily=Arial];
run;
proc report data=sashelp.cars contents="Honda Cars";
where Make="Honda";
column ("Car" make model) ("Cost" msrp invoice)
("Fuel Efficiency" mpg_city mpg_highway);
run;
ODS RTF startpage=now TEXT="{\pard\b\qc {PAGE2} \par}"; RUN;
proc report data=sashelp.cars nowd OUT=QUARTILES;
column origin type msrp msrp=msrp2 msrp=msrp3 msrp=msrp4 msrp=msrp5;
define origin / group;
define type / group;
define msrp / p25;
define msrp2 / median;
define msrp3 / p75;
define msrp4 / min;
define msrp5 / max;
run;
ods RTF close;
I also found a link to this SAS Note:
52068 - Place a border around the perimeter of the page in the ODS RTF destination (sas.com)
Hello there and Merry Christmas!
Is it the frames around the page area you are after or is it some sort of margin.
And what output type are you after? ... as your pictures of the output already contain frames. Running your code on my system does include page frames in the resulting rtf, though.
Cheers
FJa
This is what i get with the code (no boarders):
This is what I would like (with boarders):
The following style template adds a visible top and bottom page margin, but I have not found a way to add a left or right margin. This also adds a blank Footnote.
proc template;
define style styles.test;
parent=styles.rtf;
class systemtitle /
bordertopcolor=black
bordertopwidth=2pt;
class systemfooter /
borderbottomcolor=black
borderbottomwidth=2pt;
class body /
frame=box;
end;
run;
ods _all_ close;
ods RTF startpage=no file="c:\temp\test.rtf" NOGTITLE NOGFOOTNOTE
style=styles.test;
options nonumber nodate;
title PAGE BORDER;
footnote ' ';
ODS RTF startpage=now TEXT="{\pard\b\qc {PAGE1} \par}"; RUN;
proc odstext;
p "REPORT:" /style=[fontweight=bold textalign=c fontsize=20pt fontfamily=Arial];
run;
proc report data=sashelp.cars contents="Honda Cars";
where Make="Honda";
column ("Car" make model) ("Cost" msrp invoice)
("Fuel Efficiency" mpg_city mpg_highway);
run;
ODS RTF startpage=now TEXT="{\pard\b\qc {PAGE2} \par}"; RUN;
proc report data=sashelp.cars nowd OUT=QUARTILES;
column origin type msrp msrp=msrp2 msrp=msrp3 msrp=msrp4 msrp=msrp5;
define origin / group;
define type / group;
define msrp / p25;
define msrp2 / median;
define msrp3 / p75;
define msrp4 / min;
define msrp5 / max;
run;
ods RTF close;
I also found a link to this SAS Note:
52068 - Place a border around the perimeter of the page in the ODS RTF destination (sas.com)
Thank you very much!!
Thank you !!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.