ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
Quentin
Super User

Hi All,

Wondering what "best practice" is for generating a paragraph or two of text using ODS HTML.

So say you have a report, and want introductory text.

Do people use ODS TEXT= to write a paragraph (or more?)

Do people write the text to a dataset and then use PROC REPORT to print it?

I haven't had much need in the past to use SAS to write a paragraph.  But in this case I'm sending an email (html) with a table, and want to add enough text to the beginning that folks will understand what they are getting.

Thanks,

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
2 REPLIES 2
KarlK
Fluorite | Level 6

Q,


I do a lot of text reports and rarely use ODS TEXT=. Just from my experiene, you get more reliability and consistency from your PROC REPORT solution. For starters, I use something like:

proc report data=whatever nowindows noheader

style(report) = [rules=none frame=void cellspacing=0]

;

Then, all the usual style elements you might need like margins, indentation, alignment, etc. all work as expected in REPORT to fancy things up a little.

If it helps, I did a poster on some of this stuff a while back:

http://www.nesug.org/Proceedings/nesug10/po/po14.pdf

Karl

Quentin
Super User

Thanks for your thoughts Karl, and the link to your paper.  Nify approach to creating bulleted text.

--Q.

The Boston Area SAS Users Group is hosting free webinars!
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.

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
  • 2054 views
  • 3 likes
  • 2 in conversation