Marcelo,
There are multiple ways you could go about this. You could have a flag (Yes/No value) on the invoice record that you could check to determine which template to use on a per-invoice basis. You could have a flag on the customer record and link it into the invoice table to do the same on a per-customer basis.
Here's how the Print Selected function on the Invoice screen's Print... button works:
These actions print checked invoices by looping through the grid for all checked rows, adding each of the checked rows to a list, then generating reports based off of that list.
For what you're trying to do, you'd want to do this twice. Once for your checked rows that have your custom flag = YES, generating reports using one template. The second time through for your checked rows that have your custom flag = NO, generating those reports using the other template.
Hope this helps.
Need more help with customization? Ask us about Method Professional Services.
- Justin