Some of my users can print Invoices, some can print Workorders, and some can print both, all depending on whether I've installed the printer which is referred to as the AlternateDefaultPrinter() in the programming of the "Print" button on each form.
What happens to the PrintString output when a user without a referenced printer pushes the button? Of course, there is no print output, and none of the installed printers show any activity. Is the output just lost in the ether? Is a file created on disk somewhere?
Can I create an @Error test to check for this, so I can alert the user with "You cannot print a Workorder from this workstation" message? I tried putting such an @Error test after the first Printstring command, as so:
// Selects the printer
// AlternateDefaultPrinter("Workorder")
AlternateDefaultPrinter("Test")
// Prints the Workorder number
Printstring(Workorder_Number, 430, vPosY + 5, 0, "BSanSerif", 22, 0)
// Alerts the user if the Workorder printer does not exist on his machine
IF @Error
THEN Writeln("Your workstation cannot print Workorders.")
but the slate did not pop up. ("Test" is an imaginary printer.)
Any help will be, as always, greatly appreciated.