# A three-file report prints all child records under every parent

**URL:** <https://forums.softvelocity.com/t/a-three-file-report-prints-all-child-records-under-every-parent/1976>\
**Category:** Knowledge Base\
**Tags:** templates, unverified\
**Created:** [November 9, 2026, 12:40pm UTC](https://forums.softvelocity.com/t/a-three-file-report-prints-all-child-records-under-every-parent/1976 "2026-11-09T12:40:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rzaunere](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rzaunere](https://forums.softvelocity.com/u/rzaunere)\
**Post date:** [November 9, 2026, 12:40pm UTC](https://forums.softvelocity.com/t/a-three-file-report-prints-all-child-records-under-every-parent/1976/1 "2026-11-09T12:40:17Z")

</div>

**Applies to:** the standard Clarion report template, posted in the Clarion 5.5 EE group; the thread does not say whether the chain is ABC or Legacy.

**Problem**

Three files relate as Company, Invoice, InvoiceDetails. A report lists all invoices for one company, with the company limited by a range filter. Inner join is set to prevent parents without children. Still, every child prints under every parent. A test in the "Validate Record" embed (return `Record:Filtered` when the invoice numbers differ) changed nothing.

**Solution**

1. Check the file schematic first. A reply asked whether the primary file of the report is InvoiceDetails with Invoice and Company below it. The original poster's tree was the other way round, with Company on top.
2. Check the keys, relationships and report breaks. The original poster found he was breaking on a non-key field. After he fixed the key structures the report worked without any embed code.
3. If you want to control the printing by hand, set the detail band's own printing to False and print it from an embed before the detail band:

```auto
If IMS:InvoiceNumber <> IIT:InvoiceNumber
  Print(RPT:Detail)
End

```

1. A third-party template owner suggested using its features for the view, the breaking and the conditional printing.

**Caveats**

- The original poster did not say whether the embed in step 3 worked; he solved the problem with the keys.
- He noted that the resulting key structures are somewhat inefficient in storage and that he would read up on custom joins.
- The thread does not name the embed point beyond "before the detail band".

**Today (2026)**

The advice about schematic order, keys and break fields is general and likely still holds. The embed code is not re-tested on a current build.

**Sources:** John M. (Jan 2002, the question), Todd W., Gregg M., Larry T. (Jan 2002) in softvelocity.products.c55ee.
