Previous Topic: Step 3 - Specify your group calculationsNext Topic: Creating Your Report


A Step-By-Step Example: Creating a Report With Subtotals

In the rest of this chapter, you will create a series of reports that contain subtotals. Each report uses an additional CA OLQ grouping feature to enhance the original report.

You will first:

  1. Create the original report, using the EMPLOYEE data table.

    Your enhancements will then:

  2. Sort the rows of the report.
  3. Specify report groups, arranging the employees according to which department they work in.
  4. Compute a report subtotal, finding the average salary of each department.
  5. Compute a report total, finding the total amount of money paid in employee salaries.
  6. Create nested subtotals, listing the number of employees working on each project within each department.

This is how your final report looks after you have added all of the grouping enhancements:

CA OLQ Release nn.n *** Display Report *** -> Page 3 Line 25 125004 Press the ENTER key for DISPLAY/FORMAT ACTIVITY selections EMPLOYEE REPORT mm/dd/yy PROJECT SALARY-AMOUNT EMP-LAST-NAME ------------------------------ ------------------------- --------------- RESEARCH 45000.00 FINN 80000.00 WILCO ----------- COUNT FOR RESEARCH: 3 ----------- AVE FOR 5200 : 45400.00 =========== 453000.00 END OF REPORT - 3 - 1=HELP 3=QUIT 4=MESSAGE 6=MENU 7=BWD 10=LEFT 11=RIGHT

Report rows are sorted by DEPT-ID, PROJECT, and SALARY-AMOUNT. Within each department, employees are grouped by which project they work on. The average salary for each department is listed. The total amount paid in employee salaries is listed at the bottom of the report.