>I have a report (invoice) that, when printed goes to the invoice printer in the head department. When employees in remote departments print the invoice, it should print on the main department invoice printer, and also a copy on the remote department's default printer.
>I know I could get this effect with clearing the Tag fields and using "Set printer to" commands, but the report has to go to a specific tray on the invoice printer so I cannot clear the printer information in the tag fields.
>I don't want to maintain two copies of the invoice report, so does anyone know how to programmatically select trays and other stuff on the printer? Or other ideas on how to do this?
The report options're stored in Expr memo field of the first record. You can safely blank out Tag and Tag2. There is three printer driver related lines in Expr filed you have to remove
DRIVER=
DEVICE=
OUTPUT=
For the list of report options see mskb#
Q131201 and prtinfo() function help. For sample code that modifies Expr filed see mskb#
Q251236 and faq#7840.
--sb--