Applicable Versions: All


In order to create a sub report with parent and child information, you must first create a query with multiple subjects, and join those subjects using one or more fields in the parent and child subjects. For instance, in the example below, I have created a query using the Customer and Order subjects, and joined them using the customer number field;


If I select split query results on the query, my parent report will only contain customer data and I can then create a sub report that contains the order data. I would like the sub report to only show orders for the customer shown in the containing section of the parent report. To achieve this you must ensure that both child and parent query return the filter field(s) (in my case customer number), otherwise the sub report cannot filter the child data based on those fields and will always show all rows.


For example, in my query the Customer Number is selected in both the Customer subject and Order subject, regardless of whether I need to display it (see below). If I did not select Customer Number in both the Customer and Order subject, the sub report would always show all orders, rather than those relating to the parent customer.