Previous Topic: Step 2— Select a tableNext Topic: Step 4— Specifying additional selection criteria


Step 3— Choose columns and specify selection criteria

When you create a report that retrieves data from a table, you do not have to display the whole table. You can restrict the scope of your report in three ways:

Choosing columns

You don't have to display all of the columns in your table. By using the Column Select screen, you can select only those columns that you want to include in your report.

For example, if you just wanted to list employees' names and department numbers, you would only select those columns:

   Columns Currently Selected:    0     Selection Criteria     Distinct N Y/N
  _ EMPLOYEE
  _ 02 EMP-ID
  x 02 EMP-LAST-NAME
  _ 02 EMP-FIRST-NAME
  _ 02 START-YEAR
  _ 02 DEPT-HEAD-ID
  x 02 DEPT-ID
  _ 02 SALARY-AMOUNT
  _ 02 PROJECT
  _ 02 OFFICE-CODE

Specifying selection criteria

Selection criteria are logical expressions that you use to tell CA OLQ which rows of data to retrieve for your report. You specify your selection criteria in the Selection criteria field of the Column Select screen.

For example, if you only wanted to list the names of those employees in department 4000, you would specify the following:

   Columns Currently Selected:    0     Selection Criteria     Distinct N Y/N
  _ EMPLOYEE
  _ 02 EMP-ID
  x 02 EMP-LAST-NAME
  _ 02 EMP-FIRST-NAME
  _ 02 START-YEAR
  _ 02 DEPT-HEAD-ID
  x 02 DEPT-ID                               eq 4000
  _ 02 SALARY-AMOUNT
  _ 02 PROJECT
  _ 02 OFFICE-CODE

More information on how to specify selection criteria is given in Chapter 11, "How to Make a Report from Database Records"..

Specifying only unique rows

You do not have to include duplicate rows (detail lines) on your report. By using the Distinct Y/N field on the Column Select screen, you can display a report that contains only unique rows.

Select last name, start year, department head, department ID, salary amount, and project. Specify that you want to want to display only unique rows. Also, specify that you want to view only the list of employees in department 4000.

CA OLQ Release nn.n *** Column Select *** -> Page 1 of 1 124000 Select columns, specify selection criteria and press the ENTER key. Columns Currently Selected: 0 Selection Criteria Distinct N Y/N _ EMPLOYEE _ 02 EMP-ID s 02 EMP-LAST-NAME _ 02 EMP-FIRST-NAME s 02 START-YEAR s 02 DEPT-HEAD-ID s 02 DEPT-ID eq 4000 s 02 SALARY-AMOUNT s 02 PROJECT _ 02 OFFICE-CODE Additional Selection Criteria: Proceed to Selection Criteria Screen? N Y/N 1=HELP 3=QUIT 4=MESSAGE 6=MENU PA2=REFRESH