BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have an RTF file which contains multiple types of reports. Each type of report is created with a different PROC REPORT; statement. Is there an easy way to change the style each report uses without writing to multiple files, or do I have to pick a base style and code the changes to all the elements as options to each PROC REPORT?
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
It is possible to change styles "mid-document" as shown in the example code below. The key is to ONLY use the STYLE= option on your intermediate ODS RTF statement(s). I have used STARTPAGE=NO so you can easily compare all 3 output styles on 1 page.

cynthia
[pre]
ods rtf file='c:\temp\chgstyle.rtf' style=journal startpage=no;

title 'Change Style in ODS RTF';
proc report data=sashelp.class(obs=3) nowd;
run;

ods rtf style=ocean;

proc report data=sashelp.class(obs=3) nowd;
run;

ods rtf style=watercolor;

proc report data=sashelp.class(obs=3) nowd;
run;

ods rtf close;
[/pre]

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 2 replies
  • 1739 views
  • 0 likes
  • 2 in conversation