一本专注于SAS PROC REPORT的书,如果你想提高利用SAS制作报表的水平,那么这本书适合你。
Table of Contens
Chapter 1: Creating Complementary Reports
Introducti on
Exampl e: Department Store Summary and Detai l Reports
Goal s for Creati ng Compl ementary Reports
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
Create a Setup Program that Contai ns Common SAS Code
Ch1Setup.SAS
Wri ti ng the Detai l Report Program
Detai l Report Pre-Processi ng Code
Detai l Report: Ti tl es, Footnotes, and ODS RTF Preparati on
Code for Ti tl es, Footnotes, and ODS RTF Preparati on
Produci ng the Report wi th PROC REPORT
Detai l Report - PROC REPORT Code
Wri ti ng the Summary Report Program
Map Separate Vari abl es/Val ues to One Col umn for PROC REPORT
Summary Report - Pre-Processi ng Code
Assi gn Report Order to Vari abl es
Code for Creati ng Ordered Vari abl es
Summary Report: Ti tl es, Footnotes, and ODS RTF Preparati on
Code for Ti tl es, Footnotes, and ODS RTF Preparati on
Produci ng the Report wi th PROC REPORT
Summary Report - PROC REPORT Code
Chapter 1 Summary
Chapter 2: Formatting Highly Detailed Reports
Introducti on
Exampl e: Format Nati onal Sal es Report
6
Goal s for Formatti ng the Nati onal Sal es Report
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
PROC TEMPLATE Program to Create New Styl e Templ ate
The “ Before Formatti ng” Program (Program 2.1)
Impl ementati on
Transformi ng Fi gure 2.1 Into Fi gure 2.2
Di spl ayi ng Regi on as a Li ne Above Each Report Page
Overvi ew of Regi on Di spl ay
Code to Make the Regi on Di spl ay i n Fi gure 2.3
Di spl ayi ng Store and Branch Col umn Data i n Bol d Bl ue Font
Code for Store and Branch Di spl ay
How to Insert Arrows for Qui ck Reference to Sal es Increases/Decreases
Overvi ew on Arrow Inserti on
Code for Arrow Inserti on
How to Add Spanni ng Headers, Bottom Cel l Borders, and Underl i nes
Hi ghl i ghts on Addi ng Spanni ng Headers, Borders, and Underl i nes
Code for Addi ng Spanni ng Headers, Borders, and Underl i nes
Addi ng Bl ank Col umns to Make the Report More Legi bl e
Overvi ew of Addi ng Bl ank Col umns
Code for Addi ng Bl ank Col umns
Styl e: Add a Bl ank Li ne After Each Summary Li ne
Hi ghl i ghts on Styl i ng Summary Li ne and Addi ng a Bl ank Li ne
Code for Styl i ng Summary Li ne and Addi ng a Bl ank Li ne
Chapter 2 Summary
Chapter 3: Reporting Different Metrics Within a Column
Introducti on
Exampl e: Demographi c and Basel i ne Characteri sti cs Report
Goal s for the Demographi cs and Basel i ne Characteri sti cs Report
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
Obtai n Popul ati on Counts for Col umn Headers and Denomi nators
Code for Obtai ni ng Popul ati on Counts
7
Categori cal Vari abl es: Obtai n Counts and Percentages
Code for Obtai ni ng Categori cal Counts and Percentages
Conti nuous Vari abl es: Descri pti ve Data
Macro Code for Obtai ni ng Descri pti ve Stati sti cs
Create Fi nal Tabl e: Combi ne TABULATE and MEANS Resul ts
Code for Combi ng the Resul ts
Produce the Report vi a PROC REPORT
PROC REPORT Code
Chapter 3 Summary
Chapter 4: Lesion Data Quality Repor t—COMPUTE Blocks
Introducti on
Exampl e: Lesi on Data Qual i ty Report
Goal s for Creati ng the Lesi on Data Qual i ty Report
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
COMPUTE Bl ock Vari abl es: DATA Step (Temporary) Versus REPORT (COLUMN Statement)
Vari abl es
ORDER by and Pri nt Subj ect ID on Every Row wi th Greyi ng Font
Program for Subj ect ID Di spl ay
Identi fy Potenti al Data Issues
Code for Di spl ayi ng Potenti al Data Issues
Fi nal Formatti ng: Create Spanni ng Headers
Chapter 4 Summary
Chapter 5: Multi-Sheet Workbook With Histograms —ExcelXPTag sets Repor t
Introducti on
Exampl e: Mul ti -Sheet Workbook Contai ni ng Heart Study Resul ts
Goal s for Creati ng the Mul ti -Sheet Workbook
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
Create Formats and Informats
Code for Creati ng Formats and Informats
Obtai n Counts and Percentages
8
Code for Obtai ni ng Counts and Percentages
Produci ng the Workbook Wi th PROC REPORT and ODS Tagset
Code for Openi ng, Cl osi ng, and Setti ng Ini ti al Opti ons for the Excel XP Workbook
Produci ng the Speci fi c Worksheets
Code for Produci ng ByStatusCOL and ByStatusROW Worksheets
Code for Produci ng ByStatusALL Worksheet
Chapter 5 Summary
Chapte r 6: Us ing the ACROSS Option to Cr e ate a We e kly Sale s Re por t
Introducti on
Exampl e: Weekl y Sal es Report
Goal s for Creati ng a Weekl y Sal es Report
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on: Creati ng the ODS Styl e Templ ate
Proc Templ ate Code
Obtai n Cal endar Gri d and Merge Wi th Sal es
Produce the Report
Code for Produci ng the Report
Pl ace Hol ders for Data Not Yet Avai l abl e
Chapter 6 Summary
Chapte r 7: Embe dding Image s in a Re por t
Introducti on
Exampl e: Tabl es Di spl ayi ng Iri s Fl ower Measurements
Goal s for Embeddi ng Images i n Reports
Source Data
ODS Styl e Templ ates Used
Programs Used
Impl ementati on
Setup Opti ons, Fi l e Paths, and Image Fi l e Names
Program Setup Code
Exampl e 1: Obtai n Images as Col umn of Data
Code for Obtai ni ng Images as Col umn of Data
Exampl e 2: Repeated Images Above and Bel ow Tabl e
Code for Repeati ng Images Above and Bel ow Tabl e
Produce the Report
Exampl e 3: Di spl ay Images as Col umn Headers
9
Code for Di spl ayi ng Images as Col umn Headers
Exampl e 4: Di spl ay Image i n Page Ti tl e
Code for Di spl ayi ng Images i n Page Ti tl es
Exampl e 5: Di spl ay Image Above Body of Tabl e
Code for Di spl ayi ng Image Above Body of Tabl e
Exampl e 6: Di spl ay Watermark on Report
Chapter 7 Summary
Chapte r 8: Combining Gr aphs and Tabular Data
Introducti on
Exampl e: Dashboard Report of Shoe Sal es
Goal s for Creati ng the Shoe Sal es Dashboard
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
Create a Summary Data Set usi ng PROC REPORT
Code for Creati ng a Summary Data Set
Obtai n Regi onal Ranki ng Informati on
Code for Obtai ni ng Regi onal Ranki ng Informati on
Create a New ODS Styl e Templ ate
Create the ODS LAYOUT for the Report
Create Formats Needed for Outputs
Use PROC SGPLOT to Create Verti cal Bar Charts
Code for SGPLOT Verti cal Bar Charts
Usi ng PROC SGPLOT to Create a Hori z ontal Bar Chart
Hori z ontal Bar Chart Code
Usi ng PROC REPORT to Obtai n Tabul ar Output
Usi ng PROC SGPANEL to Create Bar Charts for the Top 3 Regi ons
Chapter 8 Summary
Chapte r 9: Us ing PROC REPORT to Obtain Summar y Statis tics f or Compar is on
Introducti on
Exampl e: Vehi cl e MSRP Compari son Report
Goal s for MSRP Compari son Report
Key Steps
Source Data
ODS Styl e Templ ate Used
Programs Used
Impl ementati on
10
Ini ti al PROC REPORT for Obtai ni ng Stati sti cs
Code for Obtai ni ng Stati sti cs
Produce the Report
Code for Pri nt Report
Chapter 9 Summary
References
DATA SETS
Index