EXPERT RESPONSE
There are a number of ways to do what you desire. Using your example, the answer may depend on whether you are interested in showing a separate set of details from both records related to the same employee '900' (all plan-specific info, such as each corresponding amount).
Let's assume that's your objective here. If so, one option is to add some logic to your Initialization section to build a new global index table -- that is, a basic single-column table -- with a unique record for each employee.
Then create a loop in your main window using that new table. Within that loop set up another sub-loop using the original table with the where clause picking up the unique record(s) tied to each employee and showing the relevant sub-detail, as the sub-loop processes all plans tied to that employee. In the outer loop you could show any general info for that employee, and perform other formatting, such as page breaks to show each employee's info on a separate page.
|