Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to print on Network printer from forms

112842Sep 25 2003 — edited Sep 25 2003
Dear All,
Currently the labels are being printed on printer when a text file is created on local machine and then a small delphi program 'printcopy' is called from Oracle Forms which routes the file to print,directing it to that LPT1 port .

How do I do that,to print on the Network Printer ? Does anybody have code or any ideas?

Currently it is this way:
if :TRANSACTION_TAG is not null then
:SYSTEM.MESSAGE_LEVEL := '5';
OUT_FILE := TEXT_IO.FOPEN(OUTPUT,'W');
TEXT_IO.PUT_LINE(OUT_FILE,'^XA');
TEXT_IO.PUT_LINE(OUT_FILE,'^LH00,00');
TEXT_IO.PUT_LINE(OUT_FILE,'^MD10');
TEXT_IO.PUT_LINE(OUT_FILE,'^MUDOTS');
TEXT_IO.PUT_LINE(OUT_FILE,'^CF0,20');
TEXT_IO.PUT_LINE(OUT_FILE,'^FO50,40^AB^FD'||:TRANSACTION_TAG||'^FS');
TEXT_IO.PUT_LINE(OUT_FILE,'^FO20,80^AC^FD'||SUBSTR(USER,1,20)||'^FS');
TEXT_IO.PUT_LINE(OUT_FILE,'^FO50,130^AB^FD'|| TO_CHAR(SYSDATE,'MM/DD/YY HH:MI:SSAM') ||'^FS');
TEXT_IO.PUT_LINE(OUT_FILE,'^BY2,2^FO450,70^CVY^B7N,6,1,1,12,N^FR^FD'||'TRANSID' || :TRANSACTION_TAG||'^FS');
TEXT_IO.PUT_LINE(OUT_FILE,'^XZ');
:SYSTEM.MESSAGE_LEVEL := '0';
TEXT_IO.FCLOSE(OUT_FILE);

HOST_COMMAND := '\\bdc2\data\ACNTV\FORMS\printcopy C:\RING.TXT ' || :TRANS_COPIES;

HOST(HOST_COMMAND,NO_SCREEN);
end if;

Thanks for your inputs
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2003
Added on Sep 25 2003
3 comments
890 views