Using repeating fields for line items is considered very poor style since FM 3. Unfortunately FileMaker itself uses them in the example databases shipped with installation.
Data inside of repeating fields is sort of lost and these fields have to be avoided until you completely understood the relational model and know where to use relationships.
So yes the answer is very simple: rethink your whole structure and use extra tables for line items and enter them in a portal.
Thank you for the reply.
I am not storing the data in the repeating fields, but simply printing a delivery sheet for the customer. The main data is stored in a seperate table.
I also most have a working script and I will post it later for other people to view.