Progress
Language Tutorial
for Character
Reporting Information from Two Tables
The next step is to look at the orders for each selected customer. This information is in the Order table. Another FOR EACH inside the first accomplishes this task. For each iteration of the outer block, the inner block finds all the related information. The WHERE clause establishes the relationship between the two tables.
The code below from
lt-10-07.p
shows the nested FOR EACH blocks:
The output from this procedure (following) shows how the related information ends up grouped together:
![]()
Notice that for a single iteration of the Customer data, there may be several iterations of Order data. Earlier you learned that the default frame of an iterating control block is a down frame. When you nest control blocks, only the innermost block uses a down frame. The other blocks execute one iteration at a time. This default behavior lets the related information group together naturally with the iteration of the blocks.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |