Passing File To "output" Option

jchellap

Member
QAD EE 2013
I have to send my .txt or .prn file to printer.
My expectation is something like below

Mainloop:
Repeat:
Update part.
Output to "a.txt".
For each pt_mstr where pt_domain = "zz" and pt_part = part
no-lock:
Put unformatted pt_part pt_desc1.
End.
Output close.
End.
I thought of using gpselout.i for the printing.

How do i pass the value of the file to the printer. Normally, when we use gpselout.i , we get "output" and "batch" option.

When I am giving the "output" value , the file content should be sent to the printer.

Thanks in advance!!

Thanks in advance !!!
 
On gpselout.i use the "device" parameter.
/* OUTPUT DESTINATION SELECTION */
{gpselout.i &printType = "printer"
&printWidth = 132
&pagedFlag = "NOPAGE"
&stream = " "
&appendToFile = " "
&streamedOutputToTerminal = " "
&withBatchOption = "yes"
&displayStatementType = 1
&withCancelMessage = "yes"
&pageBottomMargin = 6
&withEmail = "yes"
&device = "'myprinter'"
&withWinprint = "yes"
&defineVariables = "yes"}
 

jchellap

Member
Thanks Marco ! Just need a clarification. I tested the same and getting the following waring message "WARNING: Output device entered is not a defined printer".

Actually, I should be able to enter the "output " in the gpselout.i . Please advise.
 
Last edited:
your device must be defined on Printer maintenance, if is not defined the output is sent to a ".prn" file.
if you don't want the warning message add batchrun = TRUE. before gpselout.
 
Top