MasterDetail - Testata e Dettaglio

Hello everyone.
I have 2 tables, one header and one detail.
for each header I have several lines of detail.
I have to layout the insertion of the header and the detail lines on the same page.
Is there an example/tutorial I can follow?