ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
Daniel
Obsidian | Level 7

Dear All,

I need to make a mail-merge document which is a randomization form for a study (one page per randomization number). Each page has the company logo at the top, three centered title lines, a box with the randomization number and treatment assignment and some fields that need to be filled out by hand.

My first idea would be to use a few TITLE statements for the logo and the title lines and then a few PROC REPORT statements for the remainder, adjusting the table borders according to the needs (for instance, the signature field would be a two-row, one-column table with the first row having the bottom border and the second row having the word "Signature").

I was wondering if there is either an easier (or cooler!) way to do this using the capabilities of SAS 9.4. Two ideas that came to mind were the use of ODS LAYOUT and of the ODS Report Writing Interface. Do you have any thoughts or any experiences to share on the optimal way to go about doing this?

Thank you,

Daniel

PS The same question would apply in producing the accompanying randomization envelopes which will also be produced by mail-merging.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi:

  One thing you can do is #1) make your main merge document in Microsoft Word and define the merge fields over in Word. Then write your SAS program to create the values for the merge fields (usually in a CSV file). Finally, you go over to Word and start the merge using the CSV file to provide the information for each form. Another alternative #2) is to make the letter in a dataset in a SAS program and then merge your name data with the letter dataset and produce the entire letter file using ODS RTF. This previous forum posting has an example of #2 https://communities.sas.com/message/107987#107987.

  In addition, a more automated version of #1 that uses DDE is explained in #3) this paper http://www2.sas.com/proceedings/sugi29/034-29.pdf.

  And, yet another version of #1, using ODS HTML is shown in #4) this paper http://analytics.ncsu.edu/sesug/2005/CC05_05.PDF.

cynthia

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
  • 1 reply
  • 2269 views
  • 0 likes
  • 2 in conversation