Getting Started with the SAS System Using SAS/ASSIST Software |
The Report Engine
allows you to generate reports quickly and gives you several ways to modify and customize different aspects of your report. This
section shows you how to create a simple listing report and use the Report Engine's customizing tools to make some modifications to the report.
-
Follow this selection path:
Tasks |
|
Report Writing |
|
Design
Report |
|
Report Engine... |
The Report Engine window appears.
Report Engine Window
- If you have
previously run a Report Engine report, the selections for that report are displayed automatically in the Report Engine window. If report selections exist in the
Report Engine window, follow this selection path to clear all selections from the
window:
File |
|
New |
- Ensure that the value in the Type field is SAS. If
it is not, type
SAS
over the value in the Type field. Note that the Type field must be filled in before you select a
table.
- Use one of the following methods to select the SASUSER.HOUSES table:
- Type
SASUSER.HOUSES
in the Data field and press ENTER.
- Type a
?
in the Data field, and then select the SASUSER.HOUSES table from the Select Table window. For more information on the Select
Table window, see Selecting a Table.
When the SASUSER.HOUSES table is loaded
into the Report Engine window, SASUSER.HOUSES appears in the Data field. The table's columns are listed in the
window.
Report Engine Window with HOUSES Table
- Type
LIST
in the Report field in the Report Engine window, if it does not already appear
there.
-
Follow this selection path to generate the report:
Run |
|
Submit |
The report appears in the Report Output
window.
Report Output Window
If the report is wider or longer than one display, use the
scroll bars, the View pull-down menu, or the FORWARD, BACKWARD, LEFT, and RIGHT function keys to look at the report.
- To return to
the Report Engine window, follow this selection path:
File |
|
Close |
The Report Engine offers you a number of ways to modify and customize your report. This section shows you some of
them.
- You can delete columns from the report output. For this example, position the cursor in the
Cmd field of the Number of bathrooms row, type
D
, and press ENTER. The Number of bathrooms row disappears from the Report Engine window, and the column will not appear in the report. The column
does remain, however, in the HOUSES table.
- You can modify the column headers. Position the cursor in the Column Header field of the
Number of bedrooms row. Type
Bedrooms
over the existing column header text. You may need to delete or type blanks over the remaining column header text. Press ENTER; the column header will be renamed Bedrooms
in the report.
- You can rearrange the order in which the columns appear in the report. The values of No (for Number) determine where
the columns appear, with 1 representing the left edge. Position the cursor in the No field of the Street address row. Type a
5
, and then move the cursor to the No field of the Asking price
row. Type a
4
and press ENTER. The Asking Price column will appear to the left of the Street Address column in the report.
Note: If you wish to undo your modifications, follow this
selection path:
Edit |
|
Reset Columns |
This action restores the original columns, including their ordering and column headers, and it also
restores any deleted columns.
|
Adding Titles to a Report Engine Report |
Adding titles to a Report Engine report is slightly different from adding titles in the other SAS/ASSIST
report-generating functions. Unlike the titles specified in other report-writing tasks, the titles you specify in the Report Engine are used in Report Engine reports only and do not carry over into
other report writing tasks.
Similary, titles defined in other report writing tasks are not used in Report Engine
reports.
-
To add titles to your Report Engine report, follow this selection path from the Report Engine
window:
Edit |
|
Titles |
The TITLES window appears.
Report Engine Titles Window
- Each
numbered line in the
Titles window represents a title line. A Report Engine report can have up to 10 title lines. For this example, type
Houses for Sale
in the Value field for title number 1, and then type
By Style
in the Value field for title number 2.
- Return to the Report Engine window by following this selection
path:
File |
|
Close |
A prompt appears asking if you want to save your changes. Select
Yes.
-
Titles appear flush left by default in Report Engine reports. To center the titles, follow this selection path:
Edit |
|
Page
Layout |
The Page Layout window appears.
Page Layout Window
- In the
Center field, type
YES
and press ENTER.
- Select OK. The Page Layout window
disappears.
|
Running the Modified Report |
- Run the report with your titles by following this selection
path:
Run |
|
Submit |
Your report appears in the Report Output window, with the modifications and
titles.
Modified Report Output
- To return to the
Report Engine window, follow this selection path:
File |
|
Close |
|
Saving a Report to a SAS Catalog |
To save a report for future use, follow these steps:
- From the
Report Engine window's menu bar, follow this selection path:
File |
|
Save As... |
The Save
As window appears.
Save As Window
- Type a name for the
report in the Name field. The name must be no longer than eight characters. For this example, type the name
LSTHOUSE
.
- You may choose to type a description of the report in the Description field. The description must be no longer than 32 characters.
For this example, type
Houses for Sale (Report Engine)
.
- Select OK to save the report. If the report name exists, you are prompted to select OK again to write
over the existing report, or you can type a new name for the report.
- The Report Engine window reappears. If you modify the report
further and wish to save it again, follow this selection path from the Report Engine window's menu
bar:
File |
|
Save |
Note:
For a list of existing reports, type a
?
in the Name field of the Save As window. You can type
S
(for Select) in the Cmd field to select a report from the resulting selection list. For a list of available catalogs, type a
?
in the Catalog field. Select the catalog from the resulting selection list.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.