Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Creating Reports

Example: Create a Tabular Report

Open the Class Data Set

In this example, you use the Class data set as the basis of your report. To open the Class data set, follow these steps:

  1. Select Tools arrow Sample Data ...
  2. Select Class.
  3. Click OK to create the sample data set in your Sasuser directory.
  4. Select File arrow Open By SAS Name ...
  5. Select Sasuser from the list of Libraries.
  6. Select Class from the list of members.
  7. Click OK to bring the Class data set into the data table.

Choose a Report Style

Use the fifth report style to display the average weights by age and sex in the Class data set. To choose a report style, follow these steps:

  1. Select Reports arrow Tables ...
  2. Select the fifth report style.

    c0620a.gif (6952 bytes)

    Figure 6.22: Select the Fifth Report Style

Specify Rows and Columns

To specify the rows and columns for your report, follow these steps:

  1. In the Column Classes tab, select sex from the candidate list and click on the Column Classes button to display the values of sex as columns in your report.

    c0620.gif (7839 bytes)

    Figure 6.23: Select a Column Class

  2. Click on the Analysis Vars tab. Select weight from the list and click on the Analysis Variables button to make weight the analysis variable in your report.

    c0621.gif (7722 bytes)

    Figure 6.24: Select an Analysis Variable

  3. Click on the Stats tab. Select MEAN from the list and click on the Statistics button to display the average weight.

    c0622.gif (9244 bytes)

    Figure 6.25: Select a Statistic

  4. Click on the Row Classes tab. Select age from the list and click on the Row Classes button to display the values of age as the rows in your report.

    c0623.gif (7638 bytes)

    Figure 6.26: Select a Row Class

  5. Click on the Summary tab to see the results of your selections.

    c0624.gif (8717 bytes)

    Figure 6.27: Report Layout

Specify Report Options

To specify the options for your report, follow these steps:

  1. Click on the Options button in the Fifth Report Style dialog.
  2. In the General tab, select Include summary row. Click Bottom to display a summary row at the bottom of each column.

    c0625.gif (8025 bytes)

    Figure 6.28: Include Summary Row

  3. Click on the Missing Values tab. Type No Students in the Missing value text: field.

    c0626.gif (5225 bytes)

    Figure 6.29: Type Missing Value Text

  4. Click OK to save your changes and return to the Fifth Report Style dialog.

Specify Report Titles

To create a title and suppress the date and page numbers in your report, follow these steps:

  1. Select the Titles button in the Fifth Report Style dialog.
  2. In the Table tab, type Average Weights by Age and Sex in the first field.
  3. Select Override global titles to suppress the title from the previous example.

    c0627.gif (4121 bytes)

    Figure 6.30: Add a Title

  4. Click on the Settings tab. Deselect Include date and Include page numbers so that the date and page numbers are not displayed in your report.

    c0628.gif (3588 bytes)

    Figure 6.31: Suppress Date and Page Numbers

  5. Click OK to save your changes and to return to the Fifth Report Style dialog.

Display Your Report

To display your report in the fifth report style, click OK in the Fifth Report Style dialog.

c0629.gif (9179 bytes)

Figure 6.32: Display Report in Fifth Report Style

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.