Paper PO07. %RiTEN. Duong Tran, Independent Consultant, London, Great Britain

Similar documents
IT S THE LINES PER PAGE THAT COUNTS Jonathan Squire, C2RA, Cambridge, MA Johnny Tai, Comsys, Portage, MI

Indenting with Style

Overview 14 Table Definitions and Style Definitions 16 Output Objects and Output Destinations 18 ODS References and Resources 20

Presentation Quality Bulleted Lists Using ODS in SAS 9.2. Karl M. Kilgore, PhD, Cetus Group, LLC, Timonium, MD

This paper describes a report layout for reporting adverse events by study consumption pattern and explains its programming aspects.

ODS/RTF Pagination Revisit

ODS TAGSETS - a Powerful Reporting Method

ODS for PRINT, REPORT and TABULATE

A Novel Approach to Patient Profiling

Formatting Highly Detailed Reports: Eye-Friendly, Insight-Facilitating

SESUG Paper RIV An Obvious Yet Helpful Guide to Developing Recurring Reports in SAS. Rachel Straney, University of Central Florida

An Introduction to PROC REPORT

PharmaSUG China 2018 Paper AD-62

Word processing software

Post-Processing.LST files to get what you want

Regaining Some Control Over ODS RTF Pagination When Using Proc Report Gary E. Moore, Moore Computing Services, Inc., Little Rock, Arkansas

Workshare Compare Server 9.5.2

Using PROC SQL to Generate Shift Tables More Efficiently

A Fully Automated Approach to Concatenate RTF outputs and Create TOC Zhiping Yan, Covance, Beijing, China Lugang Xie, Merck, Princeton, US

Figure 1. Table shell

QUERIES BY ODS BEGINNERS. Varsha C. Shah, Dept. of Biostatistics, UNC-CH, Chapel Hill, NC

Display the XML Files for Disclosure to Public by Using User-defined XSL Zhiping Yan, BeiGene, Beijing, China Huadan Li, BeiGene, Beijing, China

Making a SYLK file from SAS data. Another way to Excel using SAS

Microsoft Word 2007 on Windows

Quick Results with the Output Delivery System

HTML and CSS a further introduction

Prove QC Quality Create SAS Datasets from RTF Files Honghua Chen, OCKHAM, Cary, NC

A Macro to replace PROC REPORT!?

CATEGORY SKILL SET REF. TASK ITEM

Styles, Style Sheets, the Box Model and Liquid Layout

Combining TLFs into a Single File Deliverable William Coar, Axio Research, Seattle, WA

3. Click the Change Case button. 4. On the menu, click the desired case option. Managing Document Properties

A SAS and Java Application for Reporting Clinical Trial Data. Kevin Kane MSc Infoworks (Data Handling) Limited

Word 2016: Using Section Breaks

Designing Personalized Experiences For Your Brand

COMPUTER APPLICATIONS TECHNOLOGY

Getting Up to Speed with PROC REPORT Kimberly LeBouton, K.J.L. Computing, Rossmoor, CA

ABSTRACT INTRODUCTION THE ODS TAGSET FACILITY

RWI not REI a Robust report writing tool for your toughest mountaineering challenges.

ICT IGCSE Practical Revision Presentation Word Processing

ABSTRACT MORE THAN SYNTAX ORGANIZE YOUR WORK THE SAS ENTERPRISE GUIDE PROJECT. Paper 50-30

Exporting Variable Labels as Column Headers in Excel using SAS Chaitanya Chowdagam, MaxisIT Inc., Metuchen, NJ

Professional outputs with ODS LATEX

Developing Graphical Standards: A Collaborative, Cross-Functional Approach Mayur Uttarwar, Seattle Genetics, Inc., Bothell, WA

Making an RTF file Out of a Text File, With SAS Paper CC13

Using CSS for page layout

Nomas Training. Course Outlines

Formatting a Report with Word 2010

Tips and Tricks to Create In-text Tables in Clinical Trial Repor6ng Using SAS

Utilizing SAS to Automate the Concatenation of Multiple Proc Report RTF Tables by Andrew Newcomer. Abstract

Can you decipher the code? If you can, maybe you can break it. Jay Iyengar, Data Systems Consultants LLC, Oak Brook, IL

COMSC-030 Web Site Development- Part 1. Part-Time Instructor: Joenil Mistal

USER GUIDE MADCAP FLARE Tables

TLFs: Replaying Rather than Appending William Coar, Axio Research, Seattle, WA

Managing Document Properties

Liberate, a component-based service orientated reporting architecture

Square Peg, Square Hole Getting Tables to Fit on Slides in the ODS Destination for PowerPoint

EXCEL 2007 GETTING STARTED

ADVANCED WORD PROCESSING

XF Rendering Server 2008

Macros for creating a custom report of figures

Statistics without DATA _NULLS_

Adobe Dreamweaver CS4

separate representations of data.

ODS DOCUMENT, a practical example. Ruurd Bennink, OCS Consulting B.V., s-hertogenbosch, the Netherlands

DESCRIPTION OF THE PROJECT

ECDL Advanced Word Processing

Here is the design that I created in response to the user feedback.

ABSTRACT INTRODUCTION

And Now, Presenting... Turn the Tables on Boring Reports with SAS 9.2 and RTF Tagset Options Louise S. Hadden, Abt Associates Inc.

Advanced Table Styles

Run your reports through that last loop to standardize the presentation attributes

Welcome to AEM Part Six: Accessible Microsoft Office Word Document Design.

Mark Scheme (Results)

MS Word Professional Document Alignment

October Where is it now? Working Papers and CaseView. For the Engagement team

One SAS To Rule Them All

Tips for Moving From Base SAS 9.3 to SAS Enterprise Guide 5.1 Anjan Matlapudi Corporate Medical Informatics AmeriHealth Caritas Family of Companies

CSS: Lists, Tables and the Box Model

A SAS Macro Utility to Modify and Validate RTF Outputs for Regional Analyses Jagan Mohan Achi, PPD, Austin, TX Joshua N. Winters, PPD, Rochester, NY

CitiDirect for Securities New Features February 2019

Co. Cavan VEC. Co. Cavan VEC. Programme Module for. Word Processing. leading to. Level 5 FETAC. Word Processing 5N1358. Word Processing 5N1358

Word for Research Writing I: Text and Structure

Tutorial 5 Working with Tables and Columns. HTML and CSS 6 TH EDITION

Statistics and Data Analysis. Common Pitfalls in SAS Statistical Analysis Macros in a Mass Production Environment

%ANYTL: A Versatile Table/Listing Macro

Compute; Your Future with Proc Report

ORB Education Quality Teaching Resources

Making Your Word Documents Accessible

Part 1. Getting Started. Chapter 1 Creating a Simple Report 3. Chapter 2 PROC REPORT: An Introduction 13. Chapter 3 Creating Breaks 57

Creating Forms. Starting the Page. another way of applying a template to a page.

When Simpler is Better Visualizing Laboratory Data Using SG Procedures Wei Cheng, Isis Pharmaceuticals, Inc., Carlsbad, CA

PharmaSUG China. model to include all potential prognostic factors and exploratory variables, 2) select covariates which are significant at

FROM 4D WRITE TO 4D WRITE PRO INTRODUCTION. Presented by: Achim W. Peschke

An Efficient Tool for Clinical Data Check

Advanced PROC REPORT: Getting Your Tables Connected Using Links

INFS 2150 / 7150 Intro to Web Development / HTML Programming

A Way to Work with Invoice Files in SAS

ODS LAYOUT is Like an Onion

Accessible Formatting for MS Word

Transcription:

Paper PO07 %RiTEN Duong Tran, Independent Consultant, London, Great Britain ABSTRACT For years SAS programmers within the Pharmaceutical industry have been searching for answers to produce tables and listings for clinical study reports to MS Word format. There have been numerous techniques [3] but all these, though innovative, either less convincing or requires considerable programming that they have not caught on. The advent of the ODS RTF (Rich Text Format) destination beginning SAS v8.2, in my opinion has and will make these techniques and alike obsolete. The purposes of this paper are to: 1) Introduce the %RiTEN (Rich Text Enhancer) utility and thus hope to inspire you to fully move forward to the next generation of reporting formats with the ODS. 2) Highlight the three KEY functions (cells framing, cells merging and tables stacking) that the Proc Report ODS RTF destination still lacks. INTRODUCTION %RiTEN is a SAS post-processor macro written to enhance reports generated from Proc Report ODS RTF. That is the macro can add RTF features such as cells framing, cells merging and tables stacking to the reports, plus options for styling. The three key functions of %RiTEN gives immense flexibility to the type of tables and listings that can be created. So with the aid of this utility, clinical studies can be reported efficiently to the RTF format (see examples in Appendix 1) FRAMING, MERGING CELLS AND STACKING TABLES Why these three key functions are so often wished for? 1) Within a table quite often one would like to emphasise result(s) or section(s) etc and framing will highlight these. 2) For each Proc Report called, the number of columns defined will persist throughout, but often a table consist of variable number of cells per row so cell merging will achieve this. 3) The ability to create separate tables with different Proc Report calls and stack them together gives an immense flexibility to type of tables/listings that can be produced. For 1 and 2 you can achieve these by tagging the cell(s) value(s) (e.g. {\cm\tl\bl} value cell merge, top line, bottom line) and post-process the RTF file accordingly and for 3, this is just one line of SAS code to change \par} to \} (i.e. assuming you are using the bodytitle option) So with a combination of these three facilities to enhance the RTF file from Proc Report - the type of tables/listings that can be created is up to ones creativity. Example 1 and its result, Figure 1 shows how these three functions are applied in practice. See Appendix 1 for more practical examples. Example 1 title1 j=c "{\fs30 Proc Report ODS RTF{\line}+{\line}{%}RiTEN}"; footnote; options orientation=portrait; ods listing close; ods rtf file="&outfile" style = PortraitLetterFS10 bodytitle; 1

proc report data = fin1 missing nowindows split = "#" style(report) = [rules=groups cellspacing=3pt cellpadding=1pt borderwidth=10] ; column c2 c1 c3; define c2 / display style(column) = {background=cyan cellheight=0.7in cellwidth=20%}; etc.. run; title; proc report data = fin2 missing nowindows split = "#" noheader style(report) = [frame=vsides cellspacing=0.75pt cellpadding=1pt borderwidth=10] ; column c1 c2 c3 c4 c5 c6 c7; define c1 / display style(column) = {background=green cellwidth=50 cellheight=1in}; etc.. run; footnote1 j=r "D Tran"; proc report data = fin2 missing nowindows split = "#" noheader style(report) = [rules = groups cellspacing=3pt cellpadding=1pt borderwidth=10] ; column c1; define c1 / display style(column) = {background=blue cellheight=0.5in}; run; ods rtf close; ods listing; %RiTEN(ifile = %str(&outfile), ofile = %str(&outfile), target = %str(xxx of YYY), etc..); STYLES AND ATTRIBUTES SAS provides numerous table styles and element attributes but some of these attributes can not be set by SAS at present. For example the header and footer text, the specific alignment of <#byval> and <x of y>. Figure 2 shows typical table styles and attributes that an organisation may adopt. Figures 3.x shows others typical table styles. Note the contents within <> indicates that it is optional. The titles may be left, centre or right justified and span over the width of the page or over the width of the table. The <x of y> can be of any of these styles - <pre-text> <x of y x / y x> <post-text> (e.g. Page x of y, Page [x of y], p.[x /y], Page x etc). That is <pre-text> and <post-text> is of your own choice and you have the three page numbering styles <x of y x / y x>. Beside the three key functions mentioned above, %RiTEN can handle all the attributes styling in Figure 2 and table styling in Figure 3.x. 2

These are some of the others table styles you could chose by setting the rules=groups and farme=hsides bottom top void SUMMARY The ability to stack tables and merge cells gives you the power to construct a composite (complete) table to however you like. There have been numerous papers in recent past where authors concluded that the ODS RTF destination is complex, unsatisfactory etc. When I first started on this subject area I share the same views, but no longer. In fact my views on this now are the opposite. That is not only I know all tables and listings can be done with Proc Report ODS RTF to the typical pharmaceutical industry layout requirement, in many ways it is even easier than producing them in ASCII format. If RTF is just an ASCII text file of control words (instructions) that render text - then why should post-processing to manipulating instructions that display text be more difficult than manipulating the text itself? Surely it is the other way round, as long as SAS emit RTF text in a consistent structure which it has. In SAS v9.2 you can define your own RTF Tagsets, so possibly your RTF post-processor will be even simpler. There are others proposed solutions, example using VBA etc. For me what ever solutions and technologies are used, they must be a one step process, that is the rendering / post processing should be called within the reporting program. Also the solution(s) must be viable and complete otherwise it is difficult to convince your sponsor to make the transition from ASCII. But if you can show your manager a solution and that the clients can have a much higher quality format than ASCII at the same cost or even less then this transition is inevitable. 3

The biggest obstacle but the least deal with the ODS RTF in my opinion is pagination but Jiang and Boisvert [1] has came up with a simple but practical solution. CONCLUSION In my opinion it is no longer sensible to generate tables/listings in ASCII then insert them into MS Word or have some kind of utilities to do the conversion when the ODS RTF destination is available. A major advantage of the direct approach is that Statisticians and Clinicians can incorporate the RTF files into their reports, which are most certain to be written in MS Word with minimal changes, if any at all. Another obvious advantage is that the visual quality of the RTF format. There are other ODS destinations for consideration for Clinical Reporting PDF, XML, HTML etc. so the future is optionally rich possibly Rich Text Format. I mentioned at the beginning that I believe techniques [3] will be obsolete I also believe that the ASCII format is slowly phasing out. REFERENCES [1] PhamaSug 2006: Effective Strategy to Set Page Break for ODS RTF outputs (Songtao Jiang; Daniel Boisvert) [2] SUGI 21: %Print Drivers: teaching SAS Software to Speak (Paul Wehr) [3] SUGI 27: Output Generating System A Tool for Creating Tables and Listings in Word: (Jay Zhou) [4] PhUSE 2007: Inline Formatting (Duong Tran) [5] RTF Pocket Guide: (Sean M. Buke) CONTACT INFORMATION Your comments and questions are valued and encouraged. Contact the author at: Duong Tran Tranz Ltd Phone: 07752326413 Email: trand000@aol.com www.tranz.co.uk Other brand and product names are trademarks of their respective companies. 4

APPENDIX 1 (more examples for download at www.tranz.co.uk) Example 1 Framing Cells Group A Group B Maximum Post-Baseline 1 2 Total 1 2 Total 1 0 0 0 0 0 0 2 0 0 0 0 0 0 3 0 0 0 0 0 0 Total 0 0 0 0 0 0 Page 1 of 1 Program: t_example1.sas Output: t_example1.rtf (Date Generated: 08AUG07:22:43:37) Source Data: xxxx.sas7bdat Example 2 Cells Merging Placebo (N=xxx) Drug (N=xxx) Treatment Effects Least squares mean xx.x xx.x SE xx.x xx.x 95% CI (xx.x, xx.x) (xx.x, xx.x) Treatment Difference Least squares mean xx.xxxxx SE xx.xxxxx 95% CI (xx.xxxxx, xx.xxxxx) Page 1 of 1 Note the Treatment Difference lies between the treatments. Program: t_example2.sas Output: t_example2.rtf (Date Generated: 08Aug07:23:35:25) Source Data: xxxx.sas7bdat This act like a lid when all the tables are collapsed. Example 3 Stacking Tables ref no This is a very very long text <gap between tables> startdate stopdate aept ddmmmyyy ddmmmyyy xxx yyy zzz <gap between tables> We can have a lid at the bottom also. <gap between tables> Tables have not been collapsed for demonstration purpose. Set tgap=0 in %RiTEN to do so. Page 1 of 20 Program: t_example3.sas Output: t_example3.rtf (Date Generated: 08AUG07:22:46:26) Source Data: xxxx.sas7bdat 5

APPENDIX 2 %RiTEN parameters %RiTEN(ifile = /* in file */,ofile = /* out file */,target = %str(xxx of YYY) /* target to be replace by Page x of y */,rgap = N /* remove the gap between the titles and table */,tgap = 0 /* table gap */,footw = /* in twips. -1 to use li/ri tags */,repfoot = Y /* replace footnote */,reptit = Y /* replace title */,lrcpad = 60 /* left/right cell padding in twips */,pnostyle = Page [1] /* Page numbering style [1] [2] [3] */,headery = /* offset from top edge in twips */,footery = /* offset from bottom edge in twips */,headtxt = %str() /* header text */,foottxt = %str() /* footer text */ ); 6