From the other thread title that you posted at the same time, your invoices database is based on one of the invoices starter solutions? For which version of FileMaker? (the starter solutions differ with each release of FileMaker.)
These starter solutions use two related tables to hold the data specific to an invoice with additional data in other related tables:
On the invoice layout, you'll find a portal to Invoice Data where each item purchased is a row in this portal. They print a single invoice by using a list view layout based on Invoice Data. A script pulls up the found set for the current invoice's related Invoice data records on this layout, where fields from Invoices are included in the header and footer of this layout.
The simplest method for printing a set of invoices from this starter solution is to:
a) perform a find for the invoices on an invoices based layout
b) Loop through those invoices using the already written script for printing an invoice--printing one invoice at a time, but in a loop.
You may find the scripted find examples in this thread to be useful: Scripted Find Examples