I Want Know How I Can Attach Bar Code Device With Oracle Form Bulider Using Developer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ALMISHGARI
    New Member
    • Feb 2008
    • 1

    I Want Know How I Can Attach Bar Code Device With Oracle Form Bulider Using Developer

    I Need The Code That Used To Attach Bar Code Device With Form Builder Block Using Developer 6i:
    For Example :
    I Want To Read Product_no Using Bar Code Device To Display The The Product_no And It Is Description And The Sales_price Fields From The Product Table To The Invoice Table So I Need Your Help In That And I Will Be Very Thanful To You.
  • subashsavji
    New Member
    • Jan 2008
    • 93

    #2
    Originally posted by ALMISHGARI
    I Need The Code That Used To Attach Bar Code Device With Form Builder Block Using Developer 6i:
    For Example :
    I Want To Read Product_no Using Bar Code Device To Display The The Product_no And It Is Description And The Sales_price Fields From The Product Table To The Invoice Table So I Need Your Help In That And I Will Be Very Thanful To You.
    create barcode device using java language it much easier then use it in the forms using java beans tool.


    In 9i, you could also use the barcode java bean for this.

    Access cloud trials and software downloads for Oracle applications, middleware, database, Java, developer tools, and more.

    //
    Code:
    function CF_2Formula return Char is
    myfilename varchar2(500);
    result varchar2(20);
    
    /* modified to include the value of the data element we're barcoding */
    barcodeData VarChar2(50) := :barcode_med_id;
    begin
    
    /* removed srw.create_temp_filename reference because it is not needed - you merely reset the variable four lines later */
    -- myFileName := srw.create_temporary_filename;
    barcodemaker.setBarWidthInch(globals.bcobj, .005);
    barcodemaker.setBaseCodeData(globals.bcobj,barcodeData);
    barcodemaker.setBarCodeType(globals.bcobj,globals.barcode_to_use);
    
    /* modified the following line to strip off the first and last digits and add a .jpeg extension, which is used to clean the bazillion generated image files off the server every day */
    myfilename := substr(barcodeData, 2, length(barcodeData) - 2) || '.jpeg';
    
    barcodemaker.setFullPath(globals.bcobj, myFileName); 
    barcodemaker.renderBarCode(globals.bcobj);
    return(myfilename);
    end; 
    //
    Last edited by amitpatel66; Feb 12 '08, 07:23 AM. Reason: code tags

    Comment

    • subashsavji
      New Member
      • Jan 2008
      • 93

      #3
      Originally posted by ALMISHGARI
      I Need The Code That Used To Attach Bar Code Device With Form Builder Block Using Developer 6i:
      For Example :
      I Want To Read Product_no Using Bar Code Device To Display The The Product_no And It Is Description And The Sales_price Fields From The Product Table To The Invoice Table So I Need Your Help In That And I Will Be Very Thanful To You.

      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


      =============== =============== =========
      Code:
      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;
      Last edited by amitpatel66; Feb 12 '08, 07:24 AM. Reason: code tags

      Comment

      Working...