Creating Word Tables using PROC REPORT and ODS RTF



Similar documents
Report Customization Using PROC REPORT Procedure Shruthi Amruthnath, EPITEC, INC., Southfield, MI

Paper RIV15 SAS Macros to Produce Publication-ready Tables from SAS Survey Procedures

Utilizing Clinical SAS Report Templates with ODS Sunil Kumar Gupta, Gupta Programming, Simi Valley, CA

Paper Hot Links: Creating Embedded URLs using ODS Jonathan Squire, C 2 RA (Cambridge Clinical Research Associates), Andover, MA

How to Color Your Report? By Xuefeng Yu, Celgene Co., Summit, NJ

ODS for PRINT, REPORT and TABULATE

SAS ODS HTML + PROC Report = Fantastic Output Girish K. Narayandas, OptumInsight, Eden Prairie, MN

Utilizing Clinical SAS Report Templates Sunil Kumar Gupta Gupta Programming, Thousand Oaks, CA

Using the COMPUTE Block in PROC REPORT Jack Hamilton, Kaiser Foundation Health Plan, Oakland, California

Perfecting Report Output to RTF Steven Feder, Federal Reserve Board, Washington, D.C.

PROC REPORT: How To Get Started

Enhancing RTF Output with RTF Control Words and In-Line Formatting

Methodologies for Converting Microsoft Excel Spreadsheets to SAS datasets

Counting the Ways to Count in SAS. Imelda C. Go, South Carolina Department of Education, Columbia, SC

Post Processing Macro in Clinical Data Reporting Niraj J. Pandya

This can be useful to temporarily deactivate programming segments without actually deleting the statements.

OS/390 SAS/MXG Computer Performance Reports in HTML Format

Excel 2003 Tutorial I

Beyond the Basics: Advanced REPORT Procedure Tips and Tricks Updated for SAS 9.2 Allison McMahill Booth, SAS Institute Inc.

PharmaSUG Paper QT26

ENHANCING SAS OUTPUT WITH OUTPUT DELIVERY SYSTEM (ODS)

Basic Excel Handbook

The Power to Show: Ad Hoc Reporting, Custom Invoices, and Form Letters

9.1 SAS. SQL Query Window. User s Guide

The presentation will include a code review and presentation of reports that appear in both English and Italian.

Choosing the Best Method to Create an Excel Report Romain Miralles, Clinovo, Sunnyvale, CA

Tips and Tricks for Creating Multi-Sheet Microsoft Excel Workbooks the Easy Way with SAS. Vincent DelGobbo, SAS Institute Inc.

Producing Structured Clinical Trial Reports Using SAS: A Company Solution

Customizing FREQ Procedure Output in SAS 9.2

EXST SAS Lab Lab #4: Data input and dataset modifications

ABSTRACT INTRODUCTION

Creating Multi-Sheet Microsoft Excel Workbooks with SAS : The Basics and Beyond. Part 2

SAS to Excel with ExcelXP Tagset Mahipal Vanam, Kiran Karidi and Sridhar Dodlapati

Permuted-block randomization with varying block sizes using SAS Proc Plan Lei Li, RTI International, RTP, North Carolina

Proc REPORT Tutorial Cynthia L. Zender, SAS Institute, Inc., Cary, NC

Paper PO12 Pharmaceutical Programming: From CRFs to Tables, Listings and Graphs, a process overview with real world examples ABSTRACT INTRODUCTION

IBM SPSS Statistics for Beginners for Windows

Defining a Validation Process for End-user (Data Manager / Statisticians) SAS Programs

How To Use Templates. a MailChimp guide

Chapter 4: Business Documents

Working with Tables: How to use tables in OpenOffice.org Writer

PharmaSUG Paper CC30

Introduction to Fixed Effects Methods

MICROSOFT WORD TUTORIAL

Salary. Cumulative Frequency

Importing Excel File using Microsoft Access in SAS Ajay Gupta, PPD Inc, Morrisville, NC

Anyone Can Learn PROC TABULATE

THE SAS OUTPUT DELIVERY SYSTEM: BOLDLY TAKE YOUR WEB PAGES WHERE THEY HAVE NEVER GONE BEFORE! CHEVELL PARKER, SAS INSTITUTE INC.

Storing and Using a List of Values in a Macro Variable

Web Reporting by Combining the Best of HTML and SAS

We begin by defining a few user-supplied parameters, to make the code transferable between various projects.

Labels, Labels, and More Labels Stephanie R. Thompson, Rochester Institute of Technology, Rochester, NY

Seagate Crystal Reports Designer

Listings and Patient Summaries in Excel (SAS and Excel, an excellent partnership)

Creating Raw Data Files Using SAS. Transcript

Instructions to Create Your Rollup Poster in PowerPoint

Data Presentation. Paper Using SAS Macros to Create Automated Excel Reports Containing Tables, Charts and Graphs

Crystal Reports Designer Version 10

Microsoft Word 2010 Tutorial

SUGI 29 Tutorials. Paper Using Styles and Templates to Customize SAS ODS Output Sunil K. Gupta, Gupta Programming, Simi Valley, CA

Graphic Communication Desktop Publishing

Microsoft Excel 2013 Tutorial

ADOBE DREAMWEAVER CS3 TUTORIAL

Generating Randomization Schedules Using SAS Programming Chunqin Deng and Julia Graz, PPD, Inc., Research Triangle Park, North Carolina

Creating Custom Crystal Reports Tutorial

BCS IT User Syllabus Version 2.0 Sample Test Word Processing Level 1 Version SampleMQTB/2.0/WP1/v1.0_XP07 SAMPLE TEST

TLMC WORKSHOP: THESIS FORMATTING IN WORD 2010

ABSTRACT INTRODUCTION %CODE MACRO DEFINITION

Introduction to Microsoft Excel 2010

AN ANIMATED GUIDE: SENDING SAS FILE TO EXCEL

Guido s Guide to PROC FREQ A Tutorial for Beginners Using the SAS System Joseph J. Guido, University of Rochester Medical Center, Rochester, NY

Reading Delimited Text Files into SAS 9 TS-673

PharmaSUG Paper AD03

Essential Project Management Reports in Clinical Development Nalin Tikoo, BioMarin Pharmaceutical Inc., Novato, CA

Automated distribution of SAS results Jacques Pagé, Les Services Conseils HARDY, Quebec, Qc

Methods for Interaction Detection in Predictive Modeling Using SAS Doug Thompson, PhD, Blue Cross Blue Shield of IL, NM, OK & TX, Chicago, IL

Paper Creating Variables: Traps and Pitfalls Olena Galligan, Clinops LLC, San Francisco, CA

How to Change the Template and Table of Contents for SAS Web Applications Veronica Y. Rath, INDUS Corporation, Vienna, VA

Using Excel for Analyzing Survey Questionnaires Jennifer Leahy

Using the ETDR Word Template Masters Theses and Reports

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Excel 2007 A Beginners Guide

Creating HTML Output with Output Delivery System

Excel 2007: Basics Learning Guide

Generating Customized Analytical Reports from SAS Procedure Output

Blackbaud StudentInformationSystem. Reports Guide for Admissions Office

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Utilizing SAS for Complete Report Automation Brent D. Westra, Mayo Clinic, Rochester, MN

Importing Excel Files Into SAS Using DDE Curtis A. Smith, Defense Contract Audit Agency, La Mirada, CA

BUSINESS OBJECTS XI WEB INTELLIGENCE

SAS/GRAPH 9.2 ODS Graphics Editor. User s Guide

Transcription:

Paper TT02 Creating Word Tables using PROC REPORT and ODS RTF Carey G. Smoak,, Pleasanton, CA ABSTRACT With the introduction of the ODS RTF destination, programmers now have the ability to create Word tables using SAS. This paper focuses specifically on the use of the ODS RTF destination with PROC REPORT to create Word tables. Demographic data from a research study is used to illustrate how to create Word tables. Some basic methods for generating Word tables are demonstrated. Several problems are illustrated and solutions are presented. Version 8.2 of SAS on a Windows platform was used. INTRODUCTION The RTF destination (starting with version 7 of SAS) for ODS allows the user to create Word tables by using SAS. While ODS RTF is a wonderful tool, it can also be frustrating for the user to learn its capabilities and limitations. In this paper, I present some basic methods to help the user produce Word tables using ODS RTF and PROC REPORT. This paper is not intended to be a comprehensive explanation of how to use ODS RTF with PROC REPORT. Rather, it is designed to help the user with certain tasks common in the biotechnology/diagnostic/pharmaceutical industries and how to overcome certain problems with ODS RTF with PROC REPORT. Some of the common tasks that I demonstrate in this paper are Creating headers, titles and footnotes Page numbering (Page X of Y) The bodytitle option and its effect on headers, titles, footnotes and page numbering Breaking a page The need to produce tables that can be inserted directly into document text (in-text tables) for study reports, etc., motivated me to learn how to use PROC REPORT and ODS RTF to produce Word tables. While the methods presented here can be used to produce tables and listings for study reports and other documents, I find this method most useful for in-text tables, which typically have few columns. For example, ODS RTF makes it difficult to pinpoint exactly where you want information on the page (ODS RTF does not understand code like line @15 in a compute block). Therefore, I find PROC REPORT and ODS RTF most useful for producing tables with only a few columns. (Often, tables and listings for a final report have many columns. In this case, using PROC REPORT or data _null_ to create a text file and then inserting the text file into Word may be easier.) I learned most of the information presented in this paper from two SAS live web classes that I took: Creating Detail and Summary Reports with the REPORT Procedure (a basic class on the syntax of PROC REPORT) Customizing Output from the REPORT Procedure with ODS (this class focused specifically on using ODS with PROC REPORT) DESCRIPTION OF DATA The data in this paper is demographic data from a research study. Five demographic variables were collected in this study: age (years), race, sex, height (cm) and weight (kg). There were also five treatment groups in the study. In the example programs presented in this paper, the goal is to produce a summary table of the demographic variables for each treatment group. The number of observations, mean, standard deviation, minimum and maximum are presented for continuous variables (age, height and weight) and the number of observations and percent are presented for categorical variables (race and sex). The goal is to produce a table that has the treatment groups listed across the top of the table and the demographic factors listed down the left side of the table. PROC REPORT First, let us look at how to use PROC REPORT to produce a demography summary table as a text file. In the program below, a table called demog_rept.txt will be created using PROC REPORT. This code will be modified in Examples 1-3 to show how a Word table can be created with ODS RTF. /** Create filename for output **/ filename outfile "&path\&dirname\demog_rept.txt"; proc printto file=outfile new; run; options nodate nonumber; proc report data=final nowd headline headskip ls=132 ps=49 missing; columns factor category _name_ grp_1 grp_2 grp_3 grp_4 grp_5;

define factor / "" order order=data width=10; define category / "" width=13; define _name_ / "" width=11; define grp_1 / "Group 1" width=11; define grp_2 / "Group 2" width=11; define grp_3 / "Group 3" width=11; define grp_4 / "Group 4" width=11; define grp_5 / "Group 5" width=11; run; break after factor / skip; compute before _page_; line @15 ""; line @15 "Study No.: 999"; line @15 ""; line @50 "Table 1: Demography Summary"; line @15 ""; line @15 103*'-'; endcomp; compute after _page_; line @15 103*'-'; line @15 ""; line @15 "Output: &path\&dirname\demog_rept.txt"; line @15 "Table run: &dtm"; endcomp; proc printto; run; The output for this report is not shown in this paper. PROC REPORT & ODS RTF: EXAMPLE 1 Now let's modify this program to produce a Word table. First, we add an ODS RTF statement and name the output as demog_rprt1.rtf. Next, note that we have nodate and nonumber as options, which is typical for reports in the biotechnology/ diagnostics/pharmaceutical industries. This is important, because in Example 3, I will use an option called bodytitle. Next, some style statements are added to the PROC REPORT statement. When style statements are used at this level, they set up in the general format of the Word table. These general formats can be overridden by including style statements in the define statements. For example, you can define just=left for a header in the PROC REPORT statement and then override the header with just=center in a define statement. Next, the columns of the report are defined by using the columns and define statements. In the columns statement, you will notice a variable called mypage. This variable tells the table when to break and go to the next page. Finally, note the use of compute blocks to print the header, title and footnotes by using line statements. In these compute blocks, I am using RTF control strings to control whether to left-justify (/par/ql) a line or to center (/par/qc) it. Note that in the PROC REPORT statement I define just=left for style(lines). That is why I needed to use /par/qc to center the line for Table 1: Demography Summary. In order to use these RTF control strings, you must use protectspecialcharacters=off in a style statement. ods rtf file = "&path\&dirname\demog_rpt1.rtf"; options nodate nonumber; proc report data=final nowd split='*' missing style(report)={just=center} style(lines)=header{background=white asis=on font_size=12pt font_face="timesroman" font_weight=bold just=left} style(header)=header{background=white font_size=10pt font_face="timesroman" frame=box font_weight=bold} style(column)=header{background=white font_size=10pt font_face="timesroman" font_weight=medium}; columns factor category _name_ grp_1 grp_2 grp_3 grp_4 grp_5; define factor / "Demographic*Factor" order order=data width=10;

define category / "" width=13 style(column)={just=center}; define _name_ / "Statistic" width=11 style(column)={just=center}; define grp_1 / "Group 1" width=11 style(column)={just=center}; define grp_2 / "Group 2" width=11 style(column)={just=center}; define grp_3 / "Group 3" width=11 style(column)={just=center}; define grp_4 / "Group 4" width=11 style(column)={just=center}; define grp_5 / "Group 5" width=11 style(column)={just=center}; run; break after factor / skip; compute before _page_ / style=[protectspecialchars=off]; line ""; line "Study No.: 999"; line ""; line "\par\qc{table 1: Demography Summary}"; line "\par\ql{ }"; endcomp; compute after _page_ / style=[protectspecialchars=on]; line ""; line "Output: &path\&dirname\demog_rpt1.rtf"; line "Table run: &dtm"; endcomp; ods rtf close; The output for this report is shown at the end of this paper (Example 1). PROC REPORT & ODS RTF: EXAMPLE 2 The difference between Example 1 and Example 2 is that in example 2, I use title and footnote statements to define the header, title, and footnotes instead of using compute blocks with line statements. In this example I do not have to use RTF control strings. Instead I can use j=l (left justification) and j=c (centered) to control the justification. Note that the header, title, and footnotes appear on each page of the table, but they are in the header and footer of the document. In this example, I also show how to break a page by using a variable that I created called mypage. This variable was created in the data step which created work.final: data final; run; counter = _n_; mypage = 1; if counter > 17 then do; counter = 1; mypage + 1; end; What I did was to look at the output from demog_rept.txt (not shown) and count the number of lines which would be required to break after sex. So when the counter is greater than 17, I reset it to 1 and increment mypage by 1. This example also shows how to use RTF control strings (see footnote 3 below) to print Page X of Y. I know that the code looks unsightly, but it works. When you open the RTF file, the page numbering will sometimes look backwards (Page Y of X), however, it will print out correctly as Page X of Y. You will notice on the second page of Example 2 that there is a narrow column between Demographic Factor and Statistic and that the column for Statistic is not wide enough to correctly print the word Statistic. I will show how to correct these problems in Example 3. ods rtf file = "&path\&dirname\demog_rpt2.rtf"; options nodate nonumber; proc report data=final nowd split='*' missing

run; style(report)={just=center} style(lines)=header{background=white asis=on font_size=12pt font_face="timesroman" font_weight=bold just=left} style(header)=header{background=white font_size=10pt font_face="timesroman" frame=box font_weight=bold} style(column)=header{background=white font_size=10pt font_face="timesroman" font_weight=medium}; columns mypage factor category _name_ grp_1 grp_2 grp_3 grp_4 grp_5; define mypage / order noprint; define factor / "Demographic*Factor" order order=data width=10; define category / "" width=13 style(column)={just=center}; define _name_ / "Statistic" width=11 style(column)={just=center}; define grp_1 / "Group 1" width=11 style(column)={just=center}; define grp_2 / "Group 2" width=11 style(column)={just=center}; define grp_3 / "Group 3" width=11 style(column)={just=center}; define grp_4 / "Group 4" width=11 style(column)={just=center}; define grp_5 / "Group 5" width=11 style(column)={just=center}; break after mypage / page; break after factor / skip; title1 j=l ""; title2 j=l "Study No.: 999"; title3; title4 j=c "Table 1: Demography Summary"; title5; footnote1; footnote2 j=l "Output: &path\&dirname\demog_rpt2.rtf"; footnote3 j=l "Table run: &dtm"; j=r "{Page} {\field{\*\fldinst { PAGE }}}\~{of}\~{\field {\*\fldinst { NUMPAGES }}}"; ods rtf close; The output for this report is shown at the end of this paper (Example 2). PROC REPORT & ODS RTF: EXAMPLE 3 In this example, I now use a special option called bodytitle. In Example 2, the text from the title and footnote statements are placed in the header and footer of the Word table. The bodytitle option allows the text from the title and footnote statements to be placed in the body of the table. However, as previously mentioned, the bodytitle option does not allow you to use both nodate and nonumber. Because I use the number option, a number is placed in the header in the upper right corner of the output (see Examples 3 at the end of this paper). Notice also that the bodytitle option places the footnote only on the last page of the table. Therefore, you should not use the bodytitle option if you want the footnote to appear on every page of the table. Another problem with bodytitle is that the page numbering prints out as Page 1 of. This is because I used the portrait orientation for the table. When landscape orientation is used the bodytitle option can be used with the RTF control strings for page numbering. In Example 2, in the second page of the output, there is a narrow blank column between the Demographic Factor and Statistic columns and that the word Statistic does not print correctly in the column. Here I have increased the outputwidth to 7 inches and added cellwidth statements (.75 inch). This will correct this problem. ods rtf file = "&path\&dirname\demog_rpt4.rtf" bodytitle; options nodate number; proc report data=final nowd split='*' missing style(report)={just=center outputwidth=7 in} style(lines)=header{background=white asis=on font_size=12pt font_face="timesroman" font_weight=bold just=left} style(header)=header{background=white font_size=10pt font_face="timesroman" frame=box font_weight=bold} style(column)=header{background=white font_size=10pt font_face="timesroman"

run; font_weight=medium}; columns mypage factor category _name_ grp_1 grp_2 grp_3 grp_4 grp_5; define mypage define factor / order noprint; / "Demographic*Factor" order order=data define category / "" define _name_ / "Statistic" define grp_1 / "Group 1" define grp_2 / "Group 2" define grp_3 / "Group 3" define grp_4 / "Group 4" define grp_5 / "Group 5" break after mypage / page; break after factor / skip; title1 j=l ""; title2 j=l "Study No.: 999"; title3; title4 j=c "Table 1: Demography Summary"; title5; footnote1; footnote2 j=l "Output: &path\&dirname\demog_rpt4.rtf"; footnote3 j=l "Table run: &dtm"; j=r "{Page} {\field{\*\fldinst { PAGE }}}\~{of}\~{\field {\*\fldinst { NUMPAGES }}}"; ods rtf close; The output for this report is shown at the end of this paper (Example 3). CONCLUSION The methods presented here are intended to help you get started in creating Word tables using ODS RTF and PROC REPORT. However, there are some problems that you need to be aware of in creating tables with this tool. This paper was designed to help you get started in creating Word tables and help you to overcome some common problems. Specifically, I have shown you methods for: Creating headers, titles, and footnotes Page numbering (Page X of Y) Using the bodytitle option and its effect on headers, titles, footnotes, and page numbering Breaking a page For general information on PROC REPORT, I would recommend the beginning tutorial by Ma, Schlotzhauer, and Ilieva (2002). For more advanced methods of ODS RTF and PROC REPORT, I would recommend the articles by Hamilton (2003), Hull (2001) and Shannon (2002). For more information on RTF specifications, see the Web site indicated in the References section.

REFERENCES Hamilton P. (2003), ODS to RTF: Tips and Tricks, Proceedings of the Twenty-eighth Annual SAS User Group International Conference, Cary, NC: SAS Institute, Inc., paper 24-28. Hull B. (2001), Now There is an Easy Way to Get to Word, Just Use PROC TEMPLATE, PROC REPORT, and ODS RTF Proceedings of the Twenty-sixth Annual SAS User Group International Conference, Cary, NC: SAS Institute, Inc., paper 163-26. Ma J.M., Schlotzhauer S., Ilieva M. (2002), Quick Results in PROC REPORT Proceedings of the Twenty-seventh Annual SAS User Group International Conference, Cary, NC: SAS Institute, Inc., paper 59-27. Rich Text Format Specification v. 1.2 from www.dubois.ws/software/rtf/rtf-spec-1.7.rtf Shannon D. (2002), To ODS RTF and Beyond, Proceedings of the Twenty-seventh Annual SAS User Group International Conference, Cary, NC: SAS Institute, Inc., paper 1-27. ACKNOWLEDGMENTS I would like to thank Cynthia Zender, SAS Institute, for her assistance in helping me learn various aspects of using ODS RTF with PROC REPORT. CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Carey G. Smoak 4300 Hacienda Drive Pleasanton, CA 94588 Tel. 925-730-8033 Fax 925-225-0195 carey.smoak@roche.com SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. indicates USA registration. Other brand and product names are trademarks of their respective companies.

EXAMPLE 1 Study No.: 999 Header left justified Table 1: Demography Summary Title centered Demographic Factor Statistic Group 1 Group 2 Group 3 Group 4 Group 5 AGE N 33 20 20 45 41 Mean 41.8 41.9 43.1 42 41.6 Std 5.9 4.8 6.7 6.5 5.7 Min 31 34 32 18 27 Max 55 52 55 54 57 RACE BLACK N 4 2 0 4 4 Percent 12.1 10 0 8.9 9.8 CAUCASIAN N 26 18 19 40 36 Percent 78.8 90 95 88.9 87.8 HISPANIC N 2 0 0 1 1 Percent 6.1 0 0 2.2 2.4 ORIENTAL N 1 0 1 0 0 Percent 3 0 5 0 0 SEX FEMALE N 7 7 6 8 6 Percent 21.2 35 30 17.8 14.6 MALE N 26 13 14 37 35 Percent 78.8 65 70 82.2 85.4 HEIGHT N 32 20 20 45 41 Mean 175.7 175.7 174.9 176.9 175 Std 11 8.1 12.5 7.5 9 Min 152 160 152 157 150 Max 193 188 193 188 188 WEIGHT N 33 20 20 45 41 Output: u:\sas\basas\demog_rpt1_por.rtf Table run: 16OCT2003 11:11 Mean 86.8 82.8 87.6 87.5 85.9 Std 15.5 20.5 18.1 16.6 20.2 Min 54 46 54 54 40 Max 116 123 123 128 144 Footnote left justified

EXAMPLE 2 Study No.: 999 Header in Word header Table 1: Demography Summary Title in Word header Demographic Factor Statistic Group 1 Group 2 Group 3 Group 4 Group 5 AGE N 33 20 20 45 41 Mean 41.8 41.9 43.1 42 41.6 Std 5.9 4.8 6.7 6.5 5.7 Min 31 34 32 18 27 Max 55 52 55 54 57 RACE BLACK N 4 2 0 4 4 Percent 12.1 10 0 8.9 9.8 CAUCASIAN N 26 18 19 40 36 Percent 78.8 90 95 88.9 87.8 HISPANIC N 2 0 0 1 1 Percent 6.1 0 0 2.2 2.4 ORIENTAL N 1 0 1 0 0 Percent 3 0 5 0 0 SEX FEMALE N 7 7 6 8 6 Percent 21.2 35 30 17.8 14.6 MALE N 26 13 14 37 35 Percent 78.8 65 70 82.2 85.4 Footnote in Word footer Page X of Y Output: u:\sas\basas\demog_rpt2_por.rtf Table run: 16OCT2003 11:11 Page 1 of 2

EXAMPLE 2 (continued) Study No.: 999 Narrow column Column not wide enough Table 1: Demography Summary Demographic Factor Statisti c Group 1 Group 2 Group 3 Group 4 Group 5 HEIGHT N 32 20 20 45 41 Mean 175.7 175.7 174.9 176.9 175 Std 11 8.1 12.5 7.5 9 Min 152 160 152 157 150 Max 193 188 193 188 188 WEIGHT N 33 20 20 45 41 Mean 86.8 82.8 87.6 87.5 85.9 Std 15.5 20.5 18.1 16.6 20.2 Min 54 46 54 54 40 Max 116 123 123 128 144 Page X of Y Output: u:\sas\basas\demog_rpt2_por.rtf Table run: 16OCT2003 11:11 Page 2 of 2

EXAMPLE 3 Study No.: 999 Title with body of table Header with body of table Table 1: Demography Summary Number in Word header 1 Demographic Factor Statistic Group 1 Group 2 Group 3 Group 4 Group 5 AGE N 33 20 20 45 41 Mean 41.8 41.9 43.1 42 41.6 Std 5.9 4.8 6.7 6.5 5.7 Min 31 34 32 18 27 Max 55 52 55 54 57 RACE BLACK N 4 2 0 4 4 Percent 12.1 10 0 8.9 9.8 CAUCASIAN N 26 18 19 40 36 Percent 78.8 90 95 88.9 87.8 HISPANIC N 2 0 0 1 1 Percent 6.1 0 0 2.2 2.4 ORIENTAL N 1 0 1 0 0 Percent 3 0 5 0 0 SEX FEMALE N 7 7 6 8 6 Percent 21.2 35 30 17.8 14.6 MALE N 26 13 14 37 35 Percent 78.8 65 70 82.2 85.4 No footnote in Word footer

2 EXAMPLE 3 (continued) Study No.: 999 Column is wider Table 1: Demography Summary Demographic Factor Statistic Group 1 Group 2 Group 3 Group 4 Group 5 HEIGHT N 32 20 20 45 41 Mean 175.7 175.7 174.9 176.9 175 Std 11 8.1 12.5 7.5 9 Min 152 160 152 157 150 Max 193 188 193 188 188 WEIGHT N 33 20 20 45 41 Footnote at end of table and with body of table Mean 86.8 82.8 87.6 87.5 85.9 Std 15.5 20.5 18.1 16.6 20.2 Min 54 46 54 54 40 Max 116 123 123 128 144 Page X of _ Output: u:\sas\basas\demog_rpt3_por.rtf Table run: 16OCT2003 11:11 Page 2 of 2