Autoprint 810 report for EDI weird results

Vantage 8.03.408A Progress

I had some problems getting the 855 edi sales order acknowledgement to generate a file, but I finally got it to work. I then went on to create an 810 edi invoice. I used the exact same procedure that I used for the 855. I set up a report data definition and set up the autoprint on it and then created a BAM that would trigger off of checkbox06 on the Invoice Header table.

I tested it by opening a batch of invoices, sorting them by customer, and I scrolled down until I found the customer I wanted. I clicked the checkbox that I set up for the invoice header table checkbox06 field and the EDI file was created.

The problem is that the file was larger then I expected. I looked at the data it contained and it had the data for all invoices in the batch file for that one customer I selected plus the invoice immediately before and immediately after. VERY STRANGE.

I tried manually creating the same file by printing the invoice manually and selecting the EDI style. It created the file with just the one invoice in it. I eliminated all customizations on the invoice form, and checked that there were no other BAMs or BPMs that could have interfered with the autoprint.

At this point I can't explain why it is doing what it is doing. Anyone have any ideas? If it were dumping all the invoices in the batch to the file, or all the one for a particular customer I could understand that. But to have it do all for one customer plus the one just before and just after is very weird.