Checking valid printer output

RelaX!

New Member
Hello,

Is there a way to validate a printerqueue before or right after using the "output to" statement ?

As "output to" does not have the "no-error" option you cannot use the "error-status:error" option.

I have tried to use a stream and the seek command, but it comes too late.
If the printername or (shared) queue does not exist, it generates a ABL error.

Thanx in advance.

Marcel
 

RelaX!

New Member
If a printerqueue -either local or on a network- or directly to a port or printername is not available, a continuation of the 'Output to' statement results in a ABL error: "Attempt to write to closed stream ticket. (1387)".

For background processes this error is not 'seen' by a client. For instance a PDA device running a POS application taking an order on a terrace, not aware that inside the premises, the ticket is not printed as the error has occured on the server.

Is there a way to avoid this error in order to prevent bursting data to a closed stream. Or -in other words-, is there a way to find out if 'Output to' fails right after issuing this command ?
 

RelaX!

New Member
Hello Stefan,

Thank you for the quick reply. I've tried to use the given example but does it also work for redirection to printerqueues ? Of course i tried it myself, for files it works fine but for printerqueues it doesn't seem to work.


OUTPUT TO c:/does/not/exist.txt.CATCH e AS progress.lang.proerror:
Kind regards,
RelaX! Software

Marcel
 
Top