Kbase 18780: RB: How To Display Records Which Have Multiple Corresponding Records In Another Table
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  8/21/2003 |
|
Status: Unverified
GOAL:
How to display records which have multiple corresponding records in another table.
FACT(s) (Environment):
Report Builder
FIX:
For instance, Customer and Order records would only be displayed if there are multiple orders for a particular customer.
1) Run Report Builder.
2) Select "Report", "New", and connect to the Sports Database.
3) Select the Customer table and answer yes to create an "Instant Layout". (This is just for illustrative purposes).
4) Select the Cust-num and a couple of other fields from the Customer Table.
5) Select the "Database" menu option, then select Joins....
6) Create a join from the Customer table to the Order table based on the Cust-Num field.
7) Insert a line in the "Record" Band-Line and insert a couple of fields from the Order table(Including Order-Num) in the new "Record" Band-Line.
8) Insert a new Band-Line in the "Page-Header" Band-Line and enter Labels for the Order Table fields you inserted in step 7.
9) Place the cursor on the bottom "Page-Header" Band-Line and select the "Create" menu option, followed by the "Band-Line" option or Hit "F11".
10) Select "Different Type (Below any existing lines)", then drop down the Combo-Box and select 1-GrpHead (The abbreviation changes depending on the version of progress) and click OK.
11) Select "Database" Menu option then "Group Order" (or click the "Group" Icon on the Toolbar).
12) Depending on the version of Progress you may have to hit the "New" button, then for Group level 1, select Customer.Cust-Num, and check the "Print Once" toggle-box.
13) Create an Aggregate field named "NumOrds", counting the Order.Order-Num field, and under "Reset" select the Cust-Num group order, then click the "Options" button and select the "Pre-Pass" option and hit OK.
14) Create a Calculated Field named PrintLog with the following expression:
IIF(NumOrds > 1,TRUE,FALSE).
15) Highlight the Record Band-Lines and Select "Properties" then "Band-Line Properties".
16) Depending on the version of Progress you may have to check "Enable Conditional Printing", then from the Combo-Box, select the PrintLog calculated field that you created in step 14, and check "Print when field is True".
17) Run the report and you'll see that you see only customer and order records for customers that have more than one order.