|
|
|
|
Ohio Educational Computer Network System (OECN)
|
| Previous | Contents |
Press the [PF4] key to return to the [TOP] RPW MENU as shown next.
_________________________________________________________________________________________ | | | Rpw: REPORT3 REPORT DEFINITION MODIFICATION View: PRSPAY | | | |=======================================================================================| |DD-MMM-YY HH:MN XM REPORT3 PAGE 9999 | | Lesson 3 Report | | Data definition (PRSPAY) | |=======================================================================================| |EMPLOYEE # LASTNAME DEPT. # WAGE CLASS SALARY CA_RAISE CA_NEW_SALARY| |********** *************** ******* ********** *********** ********* *************| | | | 00-000 XXXXXXXXXXXXXXX 9999 9 $999,999.99 $9,999.99 $999,999.99| | | | | | | | | | | | REPORT MENU [TOP] <PF3> cancel | | | | SELECT Rpt Fields TOTAL this Rpt MODIFY Rpt Descriptor CANCEL | | DEFINE Input/Calc Flds FORMAT this Rpt CHANGE Submit Options SAVE as | | QUALIFY Data Records GENERATE this Rpt CATALOG | | SORT Rpt Data EXAMINE Format | |_______________________________________________________________________________________| |
Again, you are asked to PREVIEW the proposed report. When the report is generated, you will be prompted to "Enter the highest Department Number to process". The value you enter will be assigned as the current value of the Input variable, IN_DEPTNO. This time the input value will be used to qualify or select only those records with DEPTNO < or = IN_DEPTNO.
In order to PREVIEW the updated report, type in the command, GEN, and press the [Return] key. The following REPORT GENERATION/ OUTPUT PARAMETERS screen will appear.
______________________________________________________________________________ | Rpw: REPORT3 REPORT GENERATION View: PRSPAY | | | | O U T P U T P A R A M E T E R S | | | | 1. Output Specification : TERMINAL | | | | 2. Printer Type : 13. Number of copies : 1 | | 3. Page Length : 60 14. First page to print: 1 | | 4. Page Width : 132 15. Last page to print : | | 5. Report Spacing : SINGLE 16. Stop every page : N | | 6. Characters per inch : | | 7. Top Margin : 17. Read Limit : | | 8. Bottom Margin : 18. Qualify Limit : | | 9. Left Margin : 19. Extract Display Inc: 500 | | 10. Page Break : N | | 11 Suppress Dupl Values : N 20. 4GL Include File : | | 12. Summary Report : N | | | | MENU <PF3> cancel | | | | CONTINUE with Generate PREVIEW this Report CANCEL | | CHANGE an Output Parameter | |____________________________________________________________________________| |
Highlight the "PREVIEW this Report" option and press the [Return] key.
Processsing will begin, and the following screen should appear which will ask you to enter some value for the "Highest Department Number to Process".
_________________________________________________________________________________________ | | | Rpw: REPORT3 REPORT GENERATION View: PRSPAY | | | | Enter the highest Department Number to Process: 20 <==== | | | |_______________________________________________________________________________________| |
Enter the value 20 and press the [Return] key. The first page of the report, similar to the following, should appear on your screen.
=======================================================================================
07-JAN-97 10:10 AM REPORT3 PAGE 1
Lesson 3 Report
Data definition (PRSPAY)
=======================================================================================
EMPLOYEE # LASTNAME DEPT. # WAGE CLASS SALARY CA_RAISE CA_NEW_SALARY
********** *************** ******* ********** *********** ********* *************
00-105 NOLL 20 1 $ 4,500.00 $ 270.00 $ 4,770.00
00-110 MARVIN 10 1 $ 3,000.00 $ 210.00 $ 3,210.00
00-120 CUSHNER 10 1 $ 1,450.00 $ 101.50 $ 1,551.50
00-145 NORRIS 10 1 $ 850.00 $ 59.50 $ 909.50
00-209 WESSELLER 20 1 $ 1,500.00 $ 90.00 $ 1,590.00
Press <RETURN> to continue....
|
Notice that only records with WAGE_CLS equal to 1 and DEPTNO's equal to 10 or 20 appear on the report. It might be useful to group the report by department number. This will be accomplished in the next lesson by sorting on the department number and lastname fields.
Press the [Return] key to return to the REPORT GENERATION/OUTPUT PARAMETERS Menu as shown below.
______________________________________________________________________________ | | | Rpw: REPORT3 REPORT GENERATION View: PRSPAY | | | | O U T P U T P A R A M E T E R S | | | | 1. Output Specification : TERMINAL | | | | 2. Printer Type : 13. Number of copies : 1 | | 3. Page Length : 60 14. First page to print: 1 | | 4. Page Width : 132 15. Last page to print : | | 5. Report Spacing : SINGLE 16. Stop every page : N | | 6. Characters per inch : | | 7. Top Margin : 17. Read Limit : | | 8. Bottom Margin : 18. Qualify Limit : | | 9. Left Margin : 19. Extract Display Inc: 500 | | 10. Page Break : N | | 11 Suppress Dupl Values : N 20. 4GL Include File : | | 12. Summary Report : N | | | | MENU <PF3> cancel | | | | CONTINUE with Generate PREVIEW this Report CANCEL | | CHANGE an Output Parameter | |____________________________________________________________________________| |
Choose the CANCEL option to return to the SERVICES MENU, (you may need to press CANCEL twice) and then select the MAIN option to return to the Main UDMS menu as shown next.
_________________________________________________________________________ | | | Version 5.3-aa User Data Management System | | | | M A I N M E N U | | | | RPW ReportWriter INQ Inquiry | | EXP Export | | LBL Labels | | TXT Text/Merge | | | | MOD Select Defs by Module (RPW, EXP, FRM...) | | DATA Select a Data Def (Record/View/Alias) | | EXIT | | | | | | | | | | | | MENU <PF2> help <PF4> exit | | | | Copyright (C) 1987-1995 Interactive Software Systems Inc. | | Enabled until 11/22/99. | |_______________________________________________________________________| |
3.6 Lesson 4 - Sorting Report Data
In previous lessons you selected fields for the report, defined new
fields, both input and calculated fields, and entered qualifications to
select the records to be included in the report.
In this lesson you will learn how to SORT or rearrange the order in which the records will print on the report. Specifically, you will print the records first in department number order, and next in alphabetical order by lastname.
In lesson 4, you will complete the following steps:
You will start up with "REPORT4" which is included in the demo
dictionary, and is an exact copy of the definition created in lesson 3.
In other words, REPORT4 starts up where you left off in the previous
lesson.
3.6.1 Load Report Definition - REPORT4
You should be at the UDMS main menu as shown below:
_____________________________________________________________________________ | | | Version 5.3-aa User Data Management System View: PRSPAY | | | | M A I N M E N U | | | | RPW ReportWriter INQ Inquiry | | EXP Export | | LBL Labels | | TXT Text/Merge | | | | MOD Select Defs by Module (RPW, EXP, FRM...) | | DATA Select a Data Def (Record/View/Alias) | | EXIT | | | | | | | | | | MENU <PF2> help <PF4> exit | | | | Copyright (C) 1987-1995 Interactive Software Systems Inc. | | Enabled until 11/18/01. | |___________________________________________________________________________| |
Proceed with the following steps on your own, as given in the next table:
| MENU / SCREEN | USER ENTRY / SELECTION | |
|---|---|---|
| 1. | Main Menu |
If your top right banner displays: "View PRSPAY", skip to step
3.
Otherwise: Highlight "DATA" option and press [Return]. |
| 2. | Data Definition Screen | Type PRSPAY and press [Return]. |
| 3. | Main Menu | Press [Return] on RPW option. |
| 4. | ReportWriter Menu | Press [Return] on SELECT any RPW Def option. |
| 5. | Report Definition Screen | Highlight REPORT4 and press [Return]. It will be necessary to press the [PF1] key several times to bring up the screen which contains the REPORT4 listing. Use the down arrow key to highlight this entry. |
The above steps should bring up the following "REPORT DEFINITION SERVICES" screen:
_________________________________________________________________________________________ | | | Rpw: REPORT4 REPORT DEFINITION SERVICES View: PRSPAY | | | |=======================================================================================| |DD-MMM-YY HH:MN XM REPORT4 PAGE 9999| | Lesson 4 Report | | Data definition (PRSPAY) | |=======================================================================================| |EMPLOYEE # LASTNAME DEPT. # WAGE CLASS SALARY CA_RAISE CA_NEW_SALARY| |********** *************** ******* ********** *********** ********* *************| | | | 00-000 XXXXXXXXXXXXXXX 9999 9 $999,999.99 $9,999.99 $999,999.99| | | | | | | | | | SERVICES MENU <PF4> finished | | | | MODIFY this Def GENERATE Report SELECT another Def FINISHED | | COPY this Def SUBMIT Report to Batch DEFINE a new Def MAIN | | DELETE this Def EXAMINE Format EXIT | | DOCUMENT this Def REVIEW Report | |_______________________________________________________________________________________| |
3.6.2 SORT Logic
Records are stored in a file in a pre-defined sequence based on the
file organization. The "SORT Report Data" option allows you to
rearrange the order in which the records will print on the report
output.
In sorting the report data, you will need to specify the following two items:
| Sort Field | The field(s) by which the data for this report will be sorted. This may be any field included in the report, including input and conditional calculated fields. | ||||||
| Sort Type |
The type of sort desired for each field:
|
The fields to be sorted for this report are as displayed below:
_________________________________________________________________________________________ | | | | | Sort Entries: 2 REPORT DATA SORTING | | Sort Field Sort Type | | | | 1 DEPTNO ASC | | 2 LASTNAME ASC | | | | | | DEFINE <PF1> Select <PF2> help <PF4> finished | |_______________________________________________________________________________________| |
Notice that there is an important difference in the results of sorting depending on the order of the sort fields. The following examples illustrate this. For the above order, the results might look like the following:
_________________________________________________________ | | | Department 123 | | Adams | | Bartlett | | Jones | | Zimmerman | | | | Department 124 | | Adams | | Johnson | | Jones | | Zimmerman | |_______________________________________________________| |
However, suppose the order of these two sort fields were reversed as shown next.
_________________________________________________________________________________________ | | | | | Sort Entries: 2 REPORT DATA SORTING | | Sort Field Sort Type | | | | 1 LASTNAME ASC | | 2 DEPTNO ASC | | | | | | DEFINE <PF1> Select <PF2> help <PF4> finished | |_______________________________________________________________________________________| |
Now the results would be quite different, as shown next.
_________________________________________________________ | | | Adams | | Department 123 | | Department 124 | | | | Bartlett | | Department 123 | | | | Johnson | | Department 123 | | | | Jones | | Department 123 | | Department 124 | | | | Zimmerman | | Department 123 | | Department 124 | |_______________________________________________________| |
| Previous | Next | Contents |