Stacking Rich Text Format (RTF) - %SRiT Duong Tran – Independent Contractor, London, UK Stacking Rich Text Format (RTF) - %SRiT Duong Tran – Independent.

Slides:



Advertisements
Similar presentations
Writers Companion was designed as the ONE program you will need for the entire writing process: Brainstorm, Organize, Edit and Publish in one program.
Advertisements

Chapter 3 – Web Design Tables & Page Layout
Outline Proc Report Tricks Kelley Weston. Outline Examples 1.Text that spans columnsText that spans columns 2.Patient-level detail in the titlesPatient-level.
Microsoft ® Office Word 2007 Training Headers and footers for document sections [Your company name] presents:
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Links and Comments.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
Web Page Development Identify elements of a Web Page Start Notepad
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
Macros Tutorial Week 20. Objectives By the end of this tutorial you should understand how to: Create macros Assign macros to events Associate macros with.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
Designing a Presentation
© 2002 ComputerPREP, Inc. All rights reserved. Word 2000: Working with Long Documents.
Introduction to Perl Part III By: Cedric Notredame Adapted from (BT McInnes)
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Microsoft Word 2010 Lesson 10. Learning Objectives 1 Understand and Use Mail Merge 2 Select and Edit a main document 3 Create a source document 4 Preview,
Moodle (Course Management Systems). Assignments 1 Assignments are a refreshingly simple method for collecting student work. They are a simple and flexible.
RTSUG 04Feb2014: Beyond Directory Listings in SAS By: Jim Worley.
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
Report Management Using the ODS DOCUMENT Destination and Report Metadata Brit Harvey February 2010.
1 PhUSE 2011 Missing Values in SAS Magnus Mengelbier Director.
XP New Perspectives on Microsoft Word 2002 Tutorial 31 Microsoft Word 2002 Tutorial 3 – Creating a Multiple-Page Report.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
ITCS373: Internet Technology Lecture 5: More HTML.
Use Your Favourite Program Editor Duong Tran – Independent Contractor, London, UK Use Your Favourite Program Editor Duong Tran – Independent Contractor,
Define your Own SAS® Command Line Commands Duong Tran – Independent Contractor, London, UK Define your Own SAS® Command Line Commands Duong Tran – Independent.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
SAS ODS (Output Delivery System) Donald Miller 812 Oswald Tower ;
Creating Macros in Excel Adding Automated Functionality to Excel & Office Applications.
Microsoft® Excel Key and format dates and times. 1 Use Date & Time functions. 2 Use date and time arithmetic. 3 Use the IF function. 4 Create.
1 EndNote X2 Your Bibliographic Management Tool 29 September 2009 Humanities and Social Sciences Resource Teams.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
XP Foundation year Practical Lec.2: Practical Lec.2: Word Processing Software Using Microsoft Office 2007 Lecturer: Fatma El-Zahraa Mohamed Year : 2015/2016.
TABLE OF CONTENTS 2014 BasmahAlQadheeb. What is a report? A report is a clearly structured document that presents information as clearly as possible.
Group 9: Through examples, explain how to build a css navigation bar. Presented by: Daniel Ku, Matt Iannacci & Iphia Henry.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Kevin Meethan Qualitative Research Methods. At a basic level, coding is any way of categorising and sorting data for the purposes of analysis In qualitative.
Visit the ccScan Website Scan, Import, and Automatically File documents to the Cloud SCAN, IMPORT, AND AUTOMATICALLY FILE DOCUMENTS TO SKYDRIVE Introduction.
Working Efficiently with Large SAS® Datasets Vishal Jain Senior Programmer.
COM: 111 Introduction to Computer Applications Department of Information & Communication Technology Panayiotis Christodoulou.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Made with OpenOffice.org 1 Beyond the Single Page Steve Oualline OpenOffice Writer.
The poster title goes here and here
CNIT 131 HTML5 - Tables.
The poster title goes here and here
Poster title Author(s) Institution(s) Corresponding author’s Name
Poster title Author(s) Institution(s) Corresponding author’s Name
Tutorial 3 – Creating a Multiple-Page Report
Make Your Code File Driven Methods to let SAS collect file names in your system Lu Zhang Beijing, China 1.
Your Poster Title Goes Here
Microsoft Word 2010 Lesson 10 Lesson 10
Microsoft Word 2010 Lesson 10 Lesson 10
The poster title goes here and here
The poster title goes here and here
Title of a Poster Paper for IW-FCV2019
3.00 Understanding the Adobe Dreamweaver interface. (12%)
The poster title goes here and here
The poster title goes here and here
Presentation transcript:

Stacking Rich Text Format (RTF) - %SRiT Duong Tran – Independent Contractor, London, UK Stacking Rich Text Format (RTF) - %SRiT Duong Tran – Independent Contractor, London, UK ABSTRACT Reporting in Rich Text Format (RTF) is gaining more and more popular and as programmers gain more experience on this topic, RTF is set to be a mainstream reporting format. In the paper %RiTEN [1], the author discussed the techniques for framing cells, merging cells and tables stacking and how the implementation of these techniques gives it an immense powerful tool for reporting. %SRiT (Stack Rich Text) in addition to these techniques gives another level of flexibility to reporting in RTF. %SRiT is a SAS ® macro that stacks RTF files. Its key objective is to stack the input RTF files but keep the originality of each individual file and have an option to reset the page counting. Therefore one can either collate the RTF files into a single report or a deliverable document, typically for review. INTRODUCTION There are occasions when stacking RTF files together to produce a single report is a much easier / quicker option. Imagine you get an ad hoc request to break down the report you have done, by category - This can often means significant changes to the structure of your program or often can be a challenge to adapt because the program was written by another programmer. In this situation %SRiT is very handy, you can just loops the reporting program per category and stack the results together. Other Scenarios where you want to stack two outputs generated from different standard reporting macros together but do not have a utility to do so. Another function of %SRiT is for stacking RTF outputs into a document for review or delivery purpose. The content of an RTF file has the following syntax. { } And with some experimenting it is observed that the RTF files could be stacked as follows. That is removes the appropriate braces and insert a separator. { }  remove } {\par} or {\sect} or {\page} { }  remove {} {\par} or {\sect} or {\page} { }  remove {} etc } An important requirement when stacking the individual files is that each individual file going into the stacked file remains entirety to its originality. That is font types, sizes and margins etc. For this you must apply a section break (i.e. the {\sect} control word) between the files. You might need to experiment and amend some other control words. Things to bear in mind are - inheritance, defaults setting etc. A PRACTICAL EXAMPLE Assume you have two outputs as in figure 1 and would like to combine them into a single output as in figure 2. Note a typical requirement is to reset the page counting as indicated. So the call for the above result would be something like: %SRiT(ifile = male.rtf {\page} # female.rtf,ofile = combined.rtf : ); And if you have multiple files to combine then you would have something like: ifile = one.rtf {\page} # two.rtf {\par} # three.rtf Note the # is a separator whereas {\page} and {\par} is to specify a page or line break respectively. Also using wild card is allows. For example if (ifile = *.rtf) then all the rtf files would be combined. This option could be used to combine the rtf files for delivery purpose but Visual Basic Application (VBA) is probably a better choice for this job. CONCLUSION The ability to stack RTF files gives another level of flexibility to reporting. This functionality can reduce production time and enable you to response quickly to ad hoc request. Also a utility such as %SRiT can be an excellent complimentary tool for patient profile reporting and alike. REFERENCES [1] Tran, Duong “%RiTEN” – PhUSE 2007 [2] Worley, Jim “Combining RTFs While Retaining Each Original Document’s Page Numbering” – PharmaSug 2007 CONTACT INFORMATION Author Name: Duong Tran Web: %SRiT(ifile = /* input files */,ofile = /* output file */,target = /* XXX of YYY */,resetpg = /* reset page (Y|N) */,splitch = /* split char */,difiles = /* delete input files */ ); : etc * read in each input file; %do i = 1 %to &count; data rtff&i; length fname&i $80; infile "%qscan(&ifile, &i, %str(&splitch))" length=linelen filename=fname&i lrecl=32767 recfm=v; input linein $varying2000. linelen; filename = fname&i; seq = &i; run; %end; data srit; * stack input files; set rtff1(in=a) %do i = 2 %to &count; rtff&i %end; end=eof ; by seq; if a then do; * remove last } of first input file; if last.seq then linein = substr(linein, 1, length(linein)-1); end; else do; * add page; if first.seq then linein = "\page" || linein; end; if eof then do; * close rtf doc; linein = trim(left(linein)) || "}"; end; run; : Etc * write file; data _null_; set srit; file "&ofile" lrecl = 2000; length mofn $20; if index(linein, "XXX of YYY") then do; mofn = "Page " || compress(put(pcount,8.)) || " of " || "&totpages"; linein = tranwrd(linein, "XXX of YYY", mofn); end; linelen =length(linein); put linein $varying2000. linelen; run; %mend; One other main aspect to consider is resetting the page count. If you have the literal text - Page 1 of 3, Page 4 of 5 etc in the output then first you can use a regular expression to change them to a tag say (XXX of YYY) then use this for re-paging. Below is a section of codes to do this. See also Worley [2] on how to deal with this if the page counting was dynamic. * count page x of y; data srit; set srit end=eof; retain rx; drop rx; * perl regular expression would be better here; if _n_=1 then rx=rxparse(" 'Page ' $d+ ' of ' $d+ to 'XXX of YYY' "); call rxchange(rx,99999,linein); retain pcount 0; if index(linein, "XXX of YYY") > 0 then do; pcount = pcount + 1; end; if eof then call symput('totpages', trim(left(put(pcount, 6.))) ); Run; PhUSE 2011 – PP04 Figure 1 Figure 2