GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  D2K
Go To First  |  Previous Question  |  Next Question 
 D2K  |  Question 18 of 71    Print  
Pl give me solution for BarCode Printing in D2k send me Example

  
Total Answers and Comments: 5 Last Update: October 08, 2007     Asked by: yogesh 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Rajender Singh Bisht
 

First Install Barcode Reader. In which have these files included as follows.

File Name Size  Folder
----------------------------------------------------
Frmpdf.exe 79 KB  Barcode Folder
Bclw.dll 85 KB  Barcode Folder
Vfp16.dll  5 KB  Barcode Folder
Form.txt variable Intelpdf Folder
Barpdf.bmp variable Intelpdf Folder (Will be created by itself)
Frmpdf.ini  1 KB  Windows Folder

[Barpdf Parameters]
BarWidth=2
BarHeight=6
Security Level=6


=======================================

PROCEDURE barcode IS

  in_file    TEXT_IO.FILE_TYPE;
  linebuf      VARCHAR2(80);
  t    varchar2(6);
  cnt     number(2);

CURSOR INV_PRIN_CUR IS
select b.cust_name, b.add1,b.add2,b.add3,b.cst_number,
  b.cst_date, b.lst_number ,b.lst_date,b.ecc_no,
  B.VEND_code,a.po_no,a.remark, a.po_date,a.challan_no,
  a.challan_dt,(a.exc_amt+A.CESS_ED) EXC_AMT,e.cust_part_no,c.product_name,
  a.desp_qty,a.rework,c.uom,a.cases,a.vehicle_no,
  a.srv_rate,a.sale_amt,a.free_supp_rate,a.bas_exc_rate,
  (a.exc_amt/a.desp_qty),a.s_tax_rate,(a.s_tax_amt/a.desp_qty),
  a.s_tax_amt,a.st_surcharge,(a.surcharge_amt/a.desp_qty),
  a.surcharge_amt,a.net_amt,a.pla_rg_sed,a.duty_ent_no,
  a.rec_type,a.main_acc_code,a.srv_no,a.product_code,a.s_tax_ind,
  a.st_code,a.recd_qty,a.party_code,a.pla_rg_bed,a.time,d.uom_desc,a.di_no,kanban_no
from srv a ,cust_master b,product_master c,unit_master d, sale_po_master e
where a.party_code  = b.cust_code and
 a.product_code = c.product_code and
 c.uom = d.uom and
 LTRIM(RTRIM(a.po_no))=LTRIM(RTRIM(e.po_number)) and
 a.product_code = e.product_code and
 a.party_code   = e.CUST_code and
 srv_no between :START_SRV and :END_SRV
 AND a.challan_Dt >= (select financial_year from install_param)
 ORDER BY SRV_NO;
BEGIN

 select count(*)
 into  cnt
 from srv a ,cust_master b,product_master c,unit_master d, sale_po_master e
 where a.party_code  = b.cust_code and
  a.product_code = c.product_code and
  c.uom = d.uom and
  LTRIM(RTRIM(a.po_no))=LTRIM(RTRIM(e.po_number)) and
  a.product_code = e.product_code and
  a.party_code   = e.CUST_code and
  srv_no between :START_SRV and :END_SRV
  AND a.challan_Dt >= (select financial_year from install_param);
if nvl(cnt,0)=0 then
 message(' No Invoice Exists for Given range of Invoice Numbers ');
 raise form_trigger_failure;
else
 forms_ddl('delete from srv_bar');
 host(' del c:\intelpdf\form*.txt ');
 host(' del c:\intelpdf\bar*.bmp ');

    FOR INV_CUR IN INV_PRIN_CUR
      LOOP
 ---message('value of srv_no is '||to_char(inv_cur.srv_no));


 in_file := TEXT_IO.FOPEN('c:\INTELPDF\form.txt','w');

    TEXT_IO.PUT(in_file,'K199');
 TEXT_IO.PUT(in_file,rpad(inv_cur.srv_no,7));
     TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'dd'));
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'mm'));
 --TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'yyyy'));
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'yy'));
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,inv_cur.cust_part_no);
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,substr(inv_cur.po_no,5,27));   
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.desp_qty));  
 TEXT_IO.NEW_LINE(in_file,1);
 if inv_cur.rec_type = 'SP' then
 TEXT_IO.PUT(in_file,'S');  
 else
 TEXT_IO.PUT(in_file,'1');  
 end if;
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,rpad(inv_cur.srv_no,7));
     TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'dd'));
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'mm'));
 --TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'yyyy'));
 TEXT_IO.PUT(in_file,to_char(inv_cur.challan_dt,'yy'));
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.sale_amt));   
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.exc_amt));   
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.PUT(in_file,to_char(inv_cur.s_tax_amt));
 TEXT_IO.NEW_LINE(in_file,1);
if inv_cur.di_no is not null then
 TEXT_IO.PUT(in_file,inv_cur.di_no);
elsif inv_cur.kanban_no is not null then
 TEXT_IO.PUT(in_file,inv_cur.kanban_no);
end if;
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.NEW_LINE(in_file,1);
 TEXT_IO.FCLOSE(in_file);

 ---message('before PDF RUN');
  HOST('C:\barcode\FRMPDF');
 ---message('AFTER PDF RUN');

 ---message('before copy');
  HOST('copy'||' c:\INTELPDF\BARPDF.BMP'||' c:\INTELPDF\'||to_char(inv_cur.srv_no)||'.BMP');
 ---message('after copy');

  READ_IMAGE_FILE('c:\INTELPDF\'||to_char(inv_cur.srv_no)||'.BMP', 'BMP', 'BARFILE');
  :SRV_NO:=INV_CUR.SRV_NO;
  NEXT_RECORD;

 END LOOP;
 COMMIT;
end if;
EXCEPTION
 WHEN no_data_found THEN
  TEXT_IO.PUT_LINE('Closing the file...');
  TEXT_IO.FCLOSE(in_file);
END;


Any information about barcode programe please call me 9868329643,rajatbisht@yahoo.com



Above answer was rated as good by the following members:
bc_sumanamara
March 24, 2006 05:03:35   #1  
jeeva        

RE: Pl give me solution for BarCode Printing in D2k se...

Example of barcode printing :

L

H19

D11

3a42090002040116ppdgk020bannv

E


 
Is this answer useful? Yes | No
April 04, 2006 07:33:28   #2  
dipti        

pl give me the introduction of D2k
please give me the brief introduction of D2k
 
Is this answer useful? Yes | No
April 08, 2006 22:40:25   #3  
Rajender Singh Bisht        

RE: Pl give me solution for BarCode Printing in D2k se...

First Install Barcode Reader. In which have these files included as follows.

File Name Size Folder
----------------------------------------------------
Frmpdf.exe 79 KB Barcode Folder
Bclw.dll 85 KB Barcode Folder
Vfp16.dll 5 KB Barcode Folder
Form.txt variable Intelpdf Folder
Barpdf.bmp variable Intelpdf Folder (Will be created by itself)
Frmpdf.ini 1 KB Windows Folder

[Barpdf Parameters]
BarWidth 2
BarHeight 6
Security Level 6


PROCEDURE barcode IS

in_file TEXT_IO.FILE_TYPE;
linebuf VARCHAR2(80);
t varchar2(6);
cnt number(2);

CURSOR INV_PRIN_CUR IS
select b.cust_name b.add1 b.add2 b.add3 b.cst_number
b.cst_date b.lst_number b.lst_date b.ecc_no
B.VEND_code a.po_no a.remark a.po_date a.challan_no
a.challan_dt (a.exc_amt+A.CESS_ED) EXC_AMT e.cust_part_no c.product_name
a.desp_qty a.rework c.uom a.cases a.vehicle_no
a.srv_rate a.sale_amt a.free_supp_rate a.bas_exc_rate
(a.exc_amt/a.desp_qty) a.s_tax_rate (a.s_tax_amt/a.desp_qty)
a.s_tax_amt a.st_surcharge (a.surcharge_amt/a.desp_qty)
a.surcharge_amt a.net_amt a.pla_rg_sed a.duty_ent_no
a.rec_type a.main_acc_code a.srv_no a.product_code a.s_tax_ind
a.st_code a.recd_qty a.party_code a.pla_rg_bed a.time d.uom_desc a.di_no kanban_no
from srv a cust_master b product_master c unit_master d sale_po_master e
where a.party_code b.cust_code and
a.product_code c.product_code and
c.uom d.uom and
LTRIM(RTRIM(a.po_no)) LTRIM(RTRIM(e.po_number)) and
a.product_code e.product_code and
a.party_code e.CUST_code and
srv_no between :START_SRV and :END_SRV
AND a.challan_Dt > (select financial_year from install_param)
ORDER BY SRV_NO;
BEGIN

select count(*)
into cnt
from srv a cust_master b product_master c unit_master d sale_po_master e
where a.party_code b.cust_code and
a.product_code c.product_code and
c.uom d.uom and
LTRIM(RTRIM(a.po_no)) LTRIM(RTRIM(e.po_number)) and
a.product_code e.product_code and
a.party_code e.CUST_code and
srv_no between :START_SRV and :END_SRV
AND a.challan_Dt > (select financial_year from install_param);
if nvl(cnt 0) 0 then
message(' No Invoice Exists for Given range of Invoice Numbers ');
raise form_trigger_failure;
else
forms_ddl('delete from srv_bar');
host(' del c:\intelpdf\form*.txt ');
host(' del c:\intelpdf\bar*.bmp ');

FOR INV_CUR IN INV_PRIN_CUR
LOOP
---message('value of srv_no is '||to_char(inv_cur.srv_no));


in_file : TEXT_IO.FOPEN('c:\INTELPDF\form.txt' 'w');

TEXT_IO.PUT(in_file 'K199');
TEXT_IO.PUT(in_file rpad(inv_cur.srv_no 7));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'dd'));
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'mm'));
--TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'yyyy'));
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'yy'));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file inv_cur.cust_part_no);
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file substr(inv_cur.po_no 5 27));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.desp_qty));
TEXT_IO.NEW_LINE(in_file 1);
if inv_cur.rec_type 'SP' then
TEXT_IO.PUT(in_file 'S');
else
TEXT_IO.PUT(in_file '1');
end if;
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file rpad(inv_cur.srv_no 7));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'dd'));
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'mm'));
--TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'yyyy'));
TEXT_IO.PUT(in_file to_char(inv_cur.challan_dt 'yy'));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.sale_amt));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.exc_amt));
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.PUT(in_file to_char(inv_cur.s_tax_amt));
TEXT_IO.NEW_LINE(in_file 1);
if inv_cur.di_no is not null then
TEXT_IO.PUT(in_file inv_cur.di_no);
elsif inv_cur.kanban_no is not null then
TEXT_IO.PUT(in_file inv_cur.kanban_no);
end if;
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.NEW_LINE(in_file 1);
TEXT_IO.FCLOSE(in_file);

---message('before PDF RUN');
HOST('C:\barcode\FRMPDF');
---message('AFTER PDF RUN');

---message('before copy');
HOST('copy'||' c:\INTELPDF\BARPDF.BMP'||' c:\INTELPDF\'||to_char(inv_cur.srv_no)||'.BMP');
---message('after copy');

READ_IMAGE_FILE('c:\INTELPDF\'||to_char(inv_cur.srv_no)||'.BMP' 'BMP' 'BARFILE');
:SRV_NO: INV_CUR.SRV_NO;
NEXT_RECORD;

END LOOP;
COMMIT;
end if;
EXCEPTION
WHEN no_data_found THEN
TEXT_IO.PUT_LINE('Closing the file...');
TEXT_IO.FCLOSE(in_file);
END;


Any information about barcode programe please call me 9868329643 rajatbisht@yahoo.com


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
April 22, 2006 03:09:35   #4  
srilaxmi        

BREIF INTRODUCTION ABOUT D2K
D2K ARE sql forms and sql reports.nothing but front end access to desing the forms with the help of built ins.WHEN U OPEN A FORM IT CONTAINS AN OBJECT NAVIGATOR SHOWING ALL THE INTRINSIC SUPPORTERS OF THE FORM BUILDER.THE MAIN PARTS ARE CANVAS --CONTAINS ALL THE ITEMS AND VISIBLE TO USERBLOCK --TO STORE DATABASE ITEMS AND USER DEFINED ITEMS ITEMS -TEXT FIELDS CHECK BOXES ETC. AND U NEED TO WRITE THE SIMPLE SQL QUERIES TO RETREIVE THE DATA
 
Is this answer useful? Yes | No
October 07, 2007 15:32:44   #5  
osden        

RE: Pl give me solution for BarCode Printing in D2k se...
Download the Barcode 39 font

In the Form label Report

Encode the value *+ value+ * for eg '*'||:itemcode||'*' (*00001*)

And assign this font to the repective field.

You can print barcode labels

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape