on the second recordset add to the where clause:
WHERE products.invoiceid = paramInvoiceID AND invoice.print = '1'
then crate a new parameter:
Name: paramInvoiceID
type: Number
default value: -1
RunTime value: $row_FirstRSName['invoiceid']
where "FirstRSName" is the name of the first recordset.