>A report has one master table and two child tables.
>So a report must show multiple records from one child table on the separate group and multiple records from another childtable on separate group.
>
>The format will be something like below.
>
>Details about the Customer.
>
>Customer Name: xyx
>
>------Customer Branches---------
>Customer Branch 1 abc
>. bcd
>.
>Customer Branch n xyz
>--------------------------------------------
>-----------Customer Products Purchased------------------
>Customer Product 1 prod1
>. prod2
>.
>Customer Product n prodn
You should combine all data in one cursor where you will have a field (e.g. 'GroupId') to indicate where the record goes: either to branches or to products:
Mycursor:
CustomerId GroupId BranchId BranchName.... ProductID ProductName....
1 1 1 'abc' 0 ''
1 1 2 'xyz' 0 ''
1 2 0 '' 1 'prod1'
1 2 0 '' 2 'prod2'
2 1 3 'pou' 0 ''
etc.
This cursor can be buiilt using UNION and /or SCAN.
Now, you can group you report by CustomerID+GroupID and use 'Print When' expression to print needed fields/labels in detail and group footer/header bands.
Edward Pikman
Independent Consultant