dbTalk Databases Forums  

printing on POS printer from Ora Forms

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss printing on POS printer from Ora Forms in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vlatko opacak
 
Posts: n/a

Default printing on POS printer from Ora Forms - 07-12-2007 , 06:42 AM






Hi,

I need a solution about printing from Ora Forms(6i) to POS printer(3-
tier architecture,AS on Unix).
You can see code bellow which is working on client-server
architecture(Windows).
But, problem is that we moved to 3-tier(AS on Unix) and now I need a
solution of how to implement this.
May I register POS printers on Unix(AS) as network printers and make a
LOV of printers so users can choose POS they want to print.Or is there
any other solution.


Tnx in advance,
Vlatko



DECLARE
OUT_FILE TEXT_IO.FILE_TYPE;
linebuf VARCHAR2(255);
cCUT_PAPER VARCHAR2(10) := CHR(27)||'i';
cCode_Page varchar2(200) := CHR(94)||CHR(93);
cPRINTER_PORT varchar2(10) := 'LPT1';--or it can be network
printer ex. '\\printers\pos1'
CURSOR C1 IS
SELECT some_col
FROM some_tbl;
v1 c1%ROWTYPE;
begin
OUT_file := TEXT_IO.FOPEN(cPRINTER_PORT, 'W');
open c1;
fetch c1 into v1;
close c1;

linebuf := 'XXXX';
TEXT_IO.PUT_LINE(OUT_file, linebuf);
linebuf := 'some additional text';
TEXT_IO.PUT_LINE(OUT_file, linebuf);

TEXT_IO.PUT(OUT_file, cCUT_PAPER);
TEXT_IO.FCLOSE(OUT_file);
end;


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.