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.

    Select the Fifth Report Style

    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.

    Select a Column Class

    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.

    Select an Analysis Variable

    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.

    Select a Statistic

    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.

    Select a Row Class

    Figure 6.26: Select a Row Class

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

    Report Layout

    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.

    Include Summary Row

    Figure 6.28: Include Summary Row

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

    Type Missing Value Text

    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.

    Add a Title

    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.

    Suppress Date and Page Numbers

    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.

Display Report in Fifth Report Style

Figure 6.32: Display Report in Fifth Report Style

Previous | Next | Top of Page