Intro to Proc Report with Excel Output

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Advertisements

1
Copyright © 2003 Pearson Education, Inc. Slide 3-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
© 2014 by McGraw-Hill Education. This is proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module D (Office 2007 Version) Decision Analysis.
BASIC SKILLS AND TOOLS USING ACCESS
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
Tutorial 3 – Creating a Multiple-Page Report
Tutorial 9 – Creating On-Screen Forms Using Advanced Table Techniques
Microsoft Access 2007 Advanced Level. © Cheltenham Courseware Pty. Ltd. Slide No 2 Forms Customisation.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Photo Slideshow Instructions (delete before presenting or this page will show when slideshow loops) 1.Set PowerPoint to work in Outline. View/Normal click.
Break Time Remaining 10:00.
1 Laying Out Pages with Tiles Source :
1 DARTBOARD Tutorial: DARTBOARD Access and Use for Faculty and Staff Tutorial: DARTBOARD Access and Use for Faculty and Staff.
User Friendly Price Book Maintenance A Family of Enhancements For iSeries 400 DMAS from Copyright I/O International, 2006, 2007, 2008, 2010 Skip Intro.
© 2010 Delmar, Cengage Learning Chapter 5 Positioning Objects with CSS and Tables.
Bright Futures Guidelines Priorities and Screening Tables
XP Tutorial 4New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
1 Tables and Lists. 2 Are Tables still needed? Tables were once used to help structure and style our pages CSS now replaces most of the old uses for tables.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
Svetlin Nakov Telerik Corporation
Creating Tables in a Web Site
Vanderbilt Business Objects Users Group 1 Reporting Techniques & Formatting Beginning & Advanced.
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
Microsoft Word By: Phuong Nguyen.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Office 2003 Integration Integrating Office 2003 Applications and the World Wide Web.
Benchmark Series Microsoft Excel 2013 Level 2
Sample Service Screenshots Enterprise Cloud Service 11.3.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
 Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance  Copyright.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Chapter 5 Microsoft Excel 2007 Window
1..
 Copyright I/O International, 2013 Visit us at: A Feature Within from Customer Payment Terms User Friendly Maintenance.
Collin College Credit Exam
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Skills for Success with Microsoft® Office 2010
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
INTRODUCTORY MICROSOFT WORD Lesson 7 – Working With Documents
2004 EBSCO Publishing Presentation on EBSCOadmin.
Benchmark Series Microsoft Excel 2010 Level 1
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Essential Cell Biology
Lesson 15 Working with Tables
PSSA Preparation.
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
Chapter 13 Web Page Design Studio
Energy Generation in Mitochondria and Chlorplasts
Lesson 16 Enhancing Documents
Import Tracking and Landed Cost Processing An Enhancement For AS/400 DMAS from  Copyright I/O International, 2001, 2005, 2008, 2012 Skip Intro Version.
Benchmark Series Microsoft Excel 2013 Level 2
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 6Protecting and Sharing Workbooks.
Know About E-CTLT Teachers Panel and working area.
Exony Reports User Guide Estimated Timings:
South Dakota Library Network MetaLib User Interface South Dakota Library Network 1200 University, Unit 9672 Spearfish, SD © South Dakota.
Benchmark Series Microsoft Excel 2013 Level 2
Microsoft Excel 2003 Illustrated Complete A Worksheet Formatting.
Microsoft Office Illustrated Introductory, Premium Edition A Worksheet Formatting.
Microsoft Office XP Illustrated Introductory, Enhanced A Worksheet Formatting.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Using the new Version 8 Template Procedure for Complete Control of SAS Output Style and Format David Ghan Technical Training Specialist SAS, Canada.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Priya Ramaswami Janssen R&D US. Advantages of PROC REPORT -Very powerful -Perform lists, subsets, statistics, computations, formatting within one procedure.
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Using SAS to Create Multi-Sheet Excel Workbooks
Presentation transcript:

Intro to Proc Report with Excel Output 3/31/2017 Intro to Proc Report with Excel Output Barbara B. Okerson WellPoint West Region Client Reporting & Analytics Enter Filename Here

Presentation Outline What is Proc Report? Syntax Customization Writing to Excel Example with healthcare data

Proc Report SAS tool to summarize and display data Flexible and customizable Use Proc Report for: Summary Reports Statistics Detail Reports Compute Blocks | FOR INTERNAL USE ONLY | DO NOT COPY

Proc Report Syntax PROC REPORT DATA= datasetname <options>; COLUMN variable list and column specifications; DEFINE column / column usage and attributes; COMPUTE column; compute block statements; ENDCOMP; RUN; | FOR INTERNAL USE ONLY | DO NOT COPY

Using the COLUMN Statement Column statement can be used to: Identify fields of interest Add headers Group fields Attach statistics to fields Fields must be listed in the order to be displayed | FOR INTERNAL USE ONLY | DO NOT COPY

Using the DEFINE Statement Lists column and attributes (attributes after / ) The type attribute: DISPLAY - displays the value of the field (default for character fields). GROUP - Consolidate observations using this field. ANALYSIS - Used in calculations with a statistic (default for numeric fields). COMPUTED- Specifies a field that is to be created in a compute block. ORDER - Sorts the data and forms groups for summary statistics, ACROSS - Used to create groups across rather than down the page. | FOR INTERNAL USE ONLY | DO NOT COPY

Using the DEFINE Statement (continued) 3/31/2017 Other DEFINE statement attributes: Format – specifies how column is formatted Width – width of column Noprint – do not display this column Flow – wrap wide text Statistic – statistic to be calculated Style – use style elements with the report | FOR INTERNAL USE ONLY | DO NOT COPY Enter Filename Here

Sample Report Syntax title1 'Using Proc Report'; title2 'Sample Report'; proc report data=sample nowd; columns month group med_members rx_members; define month/"Report Month"; define group / "Group Number"; define med_members / "Medical Members"; define rx_members / "Pharmacy Members"; run; | FOR INTERNAL USE ONLY | DO NOT COPY

Output | FOR INTERNAL USE ONLY | DO NOT COPY

Report Code with Formats and HTML Output ods html style=statistical; title1 'Using Proc Report'; title2 'Sample Report'; proc report data=sample nowd; columns month group med_members rx_members; define month/"Report Month“ f=YYMMn6.; define group / "Group Number"; define med_members / "Medical Members“ f=comma7.; define rx_members / "Pharmacy Members“ f=comma7.; run; ods html close; | FOR INTERNAL USE ONLY | DO NOT COPY

Sample Report Output with Formatting | FOR INTERNAL USE ONLY | DO NOT COPY

Using the COMPUTE Statement The COMPUTE statement can be used to: modify values within a column insert lines of text into the report to create columns control the content of a column | FOR INTERNAL USE ONLY | DO NOT COPY

Add a COMPUTE to Sample Report proc report data=sample nowd; columns month group med_members rx_members ratio ; define month/"Report Month"; define group / "Group Number"; define med_members / analysis mean "Medical Members"; define rx_members / analysis mean "Pharmacy Members"; define ratio/computed; compute ratio; ratio = rx_members.mean/med_members.mean; endcompute; run; | FOR INTERNAL USE ONLY | DO NOT COPY

New Sample Report | FOR INTERNAL USE ONLY | DO NOT COPY

Creating Subtotals and Totals in Proc Report ods html style=seaside; title1 'Using Proc Report'; title2 'Sample Report'; proc Report data=sample nowd; columns group month med_members rx_members ; define group / group "Group Number"; define month/ order "Report Month" f=yymmn6.; define med_members / "Medical Members" f=comma6.; define rx_members / "Pharmacy Members" f=comma6.; break after group/summarize; rbreak after/summarize; run; ods html close; | FOR INTERNAL USE ONLY | DO NOT COPY

Report With Subtotals and Totals | FOR INTERNAL USE ONLY | DO NOT COPY

Group and Order Order fields ORDER=FORMATTED Sorts by a field’s formatted values ORDER=DATA Sorts in the order that the field values are encountered in the data set ORDER=INTERNAL Sorts by a field’s unformatted values ORDER=FREQ Sorts by frequency counts of the field values Group fields – consolidate observations under grouped fields | FOR INTERNAL USE ONLY | DO NOT COPY

Additional Customizations Titles and Footnotes Writing to Microsoft Excel Splitting and spanning column headers Number formats Modifying cell widths Run date Line color Readability option | FOR INTERNAL USE ONLY | DO NOT COPY

| FOR INTERNAL USE ONLY | DO NOT COPY

Proc Report Code Statements proc report nowd data=sample2 split='/'; columns subgroup month ('-Medical Membership-' contracts members) ('-Total Paid-‘ ('-Medical-' inpatient_paid outpatient_paid professional_paid tot_med ) pharmacy dental vision total); define subgroup / order order=data display format =$10. style=[cellwidth= .85 in]; define month / order display 'Paid Month' format=$6.; define contracts/ display '# of Subscribers' style=[tagattr="format:#,###" cellwidth= .9 in]; define members / display '# of Members' style=[tagattr="format:#,###"]; define inpatient _paid/ display 'Inpatient' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;'}; define outpatient_paid / display 'Outpatient' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;' cellwidth= 1 in}; define professional _paid/ display 'Professional' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;' cellwidth= 1.1 in}; define tot_med/ display 'Medical/Paid/Amount' define pharmacy/ display 'Pharmacy' define dental / display 'Dental' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;'}; define vision / display 'Vision' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;'}; define total / display 'Total' style(column)={tagattr='format:$#,##0.00;[Red]($#,##0.00);[Black]0.00;'}; run; | FOR INTERNAL USE ONLY | DO NOT COPY

Spanning Headers Columns subgroup month ('-Medical Membership-' contracts members) ('-Total Paid-‘ ('-Medical-' inpatient_paid outpatient_paid professional_paid tot_med ) pharmacy dental vision total); | FOR INTERNAL USE ONLY | DO NOT COPY

Style Attributes define contracts/ display '# of Subscribers' style=[tagattr="format:#,###" cellwidth= .9 in]; define members / display '# of Members‘ style=[tagattr="format:#,###"]; define inpatient _paid/ display 'Inpatient‘ style(column)={tagattr='format:$#,##0.00;[Red]($#, ##0.00);[Black]0.00;'}; define outpatient_paid / display 'Outpatient‘ style(column)={tagattr='format:$#,##0.00;[Red]($#, ##0.00);[Black]0.00;' cellwidth= 1 in}; | FOR INTERNAL USE ONLY | DO NOT COPY

Peripheral Code ods Tagsets.ExcelXP file='R:\BOkerson\WellPoint SAS Users Group\Proc Report March 2013\new_style3.xml' style=minimal options(embedded_titles='yes' embedded_footnotes='yes'); ods tagsets.excelxp options(sheet_name = 'Sample'); title1 j=c 'CXXXXX Sample Company'; title2 j=c 'CONTRACTS, MEMBERSHIP AND PAID AMOUNT BY SETTING BY MONTH'; title3 j=c 'Paid Period: Nov 01, 2012 through Dec 31, 2012'; title4 j=c 'RIM KKKKK'; Proc report…… footnote2 j=c "This confidential information should not be distributed without Anthem's prior written consent and should only be used to review health care utilization."; footnote3 j=c "The Anthem Blue Cross and Blue Shield Companies are independent licensees of the Blue Cross and Blue Shield Association."; footnote4 j=c "Group Number(s) - CXXXXX selected segments"; footnote5 j=l "Run Date = &rundate"; ODS Tagsets.ExcelXP close; | FOR INTERNAL USE ONLY | DO NOT COPY

Titles and Footnotes Justification (j=c) Other options Height Font Color Background color Underline | FOR INTERNAL USE ONLY | DO NOT COPY

Writing to Excel ODS tagsets.excelxp file='R:\bokerson\Sample\CXXXXX_SampleCompany_MonRpt_EDW_RIM KKKKK_201211_201212.xml‘ style=minimal options(embedded_titles='yes‘ embedded_footnotes='yes'); ODS tagsets.excelxp options(sheet_name = ‘Sample'); …….report statements…… ODS tagsets.excelxp close; | FOR INTERNAL USE ONLY | DO NOT COPY

Setting the Style and Destination Type ODS tagsets.excelxp …. style=minimal …. ODS style – collection of elements ODS style attributes –e.g. font, color, width ODS Tagsets – associate template with destination ODS ExcelXP Tagset Destination – output in Microsoft’s SpreadsheetML XML format Combine style and tagset | FOR INTERNAL USE ONLY | DO NOT COPY

Style=seaside Bolded title and headers Shaded background for title cells Colored grid lines | FOR INTERNAL USE ONLY | DO NOT COPY

Style=default Shaded backgrounds Italic and bolded header White grid lines | FOR INTERNAL USE ONLY | DO NOT COPY

Available SAS Styles To view available styles run the following code: proc template; list styles; run; SAS writes the list of available styles in the output window. | FOR INTERNAL USE ONLY | DO NOT COPY

Add Group And Order Order: define subgroup / order order=data display format =$10. style=[cellwidth= .85 in]; define month / order display 'Paid Month' format=$6.; Group: define subgroup / group order=data display format =$10. style=[cellwidth= .85 in]; | FOR INTERNAL USE ONLY | DO NOT COPY

Order and Group Output Corner of original report. Corner of report with subgroup as group field. | FOR INTERNAL USE ONLY | DO NOT COPY

Automatic Run Date Store date in macro field: data _null_; today_date=today(); CALL SYMPUT('rundate',put(today_date,mmddyy10.)); run; Use macro field in footnote: footnote5 j=l "Run Date = &rundate"; | FOR INTERNAL USE ONLY | DO NOT COPY

Other Enhancements Line color Highlight every other row Write to multiple worksheets | FOR INTERNAL USE ONLY | DO NOT COPY

Proc Template to Modify Line Color define style styles.test; parent=styles.minimal; style table from table/ bordercolor =blue; end; run; ods Tagsets.ExcelXP file='R:\BOkerson\WellPoint SAS Users Group\new_style4x.xml' style=test options(embedded_titles='yes' embedded_footnotes='yes' ); | FOR INTERNAL USE ONLY | DO NOT COPY

| FOR INTERNAL USE ONLY | DO NOT COPY

Compute Group Code for Line Shading Compute subgroup; line_count+1; if mod(line_count,2)=0 then do; call define (_row_, "style", "style=[background=cxF2F2DF]"); end; Endcomp; | FOR INTERNAL USE ONLY | DO NOT COPY

| FOR INTERNAL USE ONLY | DO NOT COPY

Code for Multiple Sheets with By-Value ods Tagsets.excelxp file='R:\BOkerson\totals2.xml' style=minimal options(embedded_titles='yes' embedded_footnotes='yes' ); ods tagsets.excelxp options(sheet_name = '#byval(subgroup)'); proc Report nowd data=sample3 headline headskip split='/'; columns ('-#byval(Subgoup)-'month ('-Medical Membership-' contracts members) ('-Total Paid-' ('-Medical-' inpatient_paid outpatient_paid professional_paid tot_med) pharmacy )); define month / order 'Paid Month' format=$6.; ............. by subgroup; run; ODS Tagsets.excelxp close; | FOR INTERNAL USE ONLY | DO NOT COPY

Proc Report By Value Output | FOR INTERNAL USE ONLY | DO NOT COPY

Add a Logo to Proc Report Output MSOffice2K_x tagset Download from http://support.sas.com/rnd/base/ods/odsmarkup/msoffice2k/index.html Run the code before running Proc Report WellPoint logo in upper left corner Options image_path="R:\bokerson\wellpoint_logo.gif" image_height="45" image_width="90" |

3/31/2017 Enter Filename Here

Questions??? | FOR INTERNAL USE ONLY | DO NOT COPY

Contact Information Barbara B. Okerson, Ph.D Senior Health Information Consultant,  West Region Client Reporting & Analytics WellPoint Health Care Analytics Phone: 804-662-5287 Email: barbara.okerson@wellpoint.com | FOR INTERNAL USE ONLY | DO NOT COPY