ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
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
SAS Super FREQ
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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