A procedure is implemented with a couple of nested For eachs, where the information of the external For each is related to that of the internal For each with a relation of one to many. An explanation is given regarding the difference between this case (join) and cases where there is no evident relation between the information (Cartesian product).
We recommend that you view the "Introduction to procedures and listings. Command to query the database" video.
Additionally: nested For eachs –related navigations, independent For eachs, join, print, Cartesian product, printblock, layout, source, base table, extended table, pdf report.