backnextLearning Path
   


Introduction

List and summary reports are often created from SAS data. To produce a variety of reports using a single report-writing tool, you can use PROC REPORT. In addition to creating list reports, PROC REPORT enables you to

  • create custom reports
  • request separate subtotals and grand totals
  • calculate columns
  • create and store report definitions.

You can use PROC REPORT in three ways:

  • in windowing mode with a prompting facility that guides you as you build a report
  • in windowing mode without the prompting facility
  • in nonwindowing mode. In this case, you submit a series of statements with the PROC REPORT statement, just as you do in other SAS procedures.

This lesson shows you how to use PROC REPORT by submitting SAS statements. Although PROC REPORT enables you to create highly customized reports, we'll focus on basic statements and will add a few enhancements. By the end of the lesson, you'll create a list report and a summary report.



PROC REPORT List Report

Flight
Number
Flight
Origin
Flight
Destination
Mail /
Pounds
Freight /
Pounds
Revenue
821 LGA LON 403 209 $150,634.00
821 LGA LON 345 243 $150,634.00
821 LGA LON 248 307 $193,930.00
821 LGA LON 391 395 $167,772.00
821 LGA LON 219 368 $183,106.00
821 LGA LON 389 479 $169,576.00
821 LGA LON 448 282 $143,561.00
821 LGA LON 403 209 $170,766.00
821 LGA LON 345 243 $129,560.00
821 LGA LON 248 307 $196,736.00
821 LGA LON 391 395 $125,344.00
821 LGA LON 219 368 $166,543.00
821 LGA LON 389 479 $129,745.00

PROC REPORT Summary Report
Flight
Number
Flight
Origin
Flight
Destination
Mail /
Pounds
Freight /
Pounds
Total
Revenue
821 LGA LON 4,438 4,284 $2,077,907.00
271 LGA PAR 5,050 4,421 $1,969,201.00
219 LGA LON 2,700 2,513 $1,111,647.00


Time to Complete

This lesson contains pages and takes approximately 1 hour to complete.



Objectives

In this lesson, you learn to

  • invoke the REPORT procedure
  • select columns for your report
  • define the usage for columns
  • specify attributes, options, and justification for columns
  • specify features of column headings, including split characters, underlining, and blank lines.

Prerequisites

Before taking this lesson, you should complete the following lessons:

  • .

  Copyright © 2003 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement
backnext