Previous Page | Next Page

Doing More with Report Writing

Limiting the Number of Rows for a Report

When you create a report, you can select Subset data in the report windows to limit the number of rows that are processed to create the report. This feature is especially useful when your final report is very long, and you want to use a limited number of rows for testing before producing the final report.

In this section, you limit the number of rows to five for a listing report of the CLASS table.


Additional Information

For additional information on writing reports, refer to the "Report Writing" and "Using the Report Engine" chapters in Getting Started with SAS/ASSIST, and Doing More with the Report Engine.


Instructions

  1. To display the List a Table window, follow this selection path:Tasks [arrow] Report Writing [arrow] Listing

    List a Table Window

    [List a Table Window]

  2. Use the Table button to select the SASUSER.CLASS table.

  3. Select Subset data. The Subset Data window appears.

    Subset Data Window

    [Subset Data Window]

  4. Select Restrict Rows. The Restrict Rows window appears.

    Restrict Rows Window

    [Restrict Rows Window]

  5. In the Number of rows to process field, type 5 as the number of rows you want to use for the listing report.

    The default for the Number of rows to process field is MAX, which includes all the rows in the table. To reset the field to its default value, select Reset.

  6. Select OK, then Goback to return to the List a Table window.

  7. To run the report, follow this selection path:Run [arrow] SubmitThe listing report appears with only five rows.

    CLASS Listing Report with Restricted Rows

    [CLASS Listing Report with Restricted Rows]

  8. Return to SAS/ASSIST software from the OUTPUT window. See Returning to SAS/ASSIST Windows from the Output Window for more information.

  9. Follow this selection path from the List a Table window to save the source code for the report. You use the saved source code in the next section.File [arrow] Save as sourceThe Save As window appears.

  10. In the Name field, type CLASSRST and press TAB.

  11. In the Description field, type CLASS report - restricted rows and select OK. A message appears to inform you that the source code was successfully saved.

For more information on saving and editing source code, refer to the "Saving Source Code for Editing and Re-execution" chapter in Getting Started with SAS/ASSIST.

Previous Page | Next Page | Top of Page