Skip to main content

New Installation of Beas - We need to have a New Button on ¨"Receipt from PO" to Print a Material Barcode Label

Comments

2 comments

  • Jesús Medina

    Hello Jorge,

    Thanks for your comment about the video. :-)

    Video is quite old but I created similar example for you.

     

    sbo_721.src

    windowevent opened
    setvar=l_ypos=<item=2=y>
    setvar=l_width=<item=2=width>
    setvar=l_height=<item=2=height>
    setvar=l_xpos=<item=2=x>
    setvar=l_xpos=%numadd(<l_xpos>,<l_width>,10)
    setvar=l_width=%numadd(<l_width>,20)
    create button=name=beas_pl,text=Print Label,x=<l_xpos>,y=<l_ypos>,width=<l_width>,height=<l_height>
    end event

    windowevent itempressed beas_pl
    setvar=e_docnum=<item.7.value>
    destroy=dtw

    declare=dtw=ue_datastorevalues

    dtw=select OITM.InvntryUom+'' as invntryuom, /*coalesce("BEAS_ME"."ANZDEZ",2)*/ 2 as anzdez, IGN1.U_belnrid+'' as ign1_u_belnrid, OIGN.docentry+0 as oign_docentry, OIGN.DocNum+0 as oign_docnum, OIGN.CardCode+'' as oign_cardcode, IGN1.ItemCode+'' as ign1_itemcode, IGN1.Dscription+'' as ign1_dscription,  itl1.Quantity+0 as itl1_quantity, obtn.DistNumber+'' as obtn_distnumber &
        from IGN1 &
        inner join OIGN on OIGN.docentry=IGN1.docentry &
        inner join OITL on oitl.doctype=IGN1.objtype and oitl.docentry=IGN1.docentry and oitl.docline=IGN1.linenum &
        inner join itl1 on itl1.logentry=oitl.logentry and itl1.itemcode=oitl.itemcode &
        inner join oitm on oitm.itemcode = itl1.itemcode &
        left outer join obtn on obtn.sysnumber=itl1.sysnumber and obtn.itemcode=itl1.itemcode and oitm.manbtchnum='Y' &
        left outer join osrn on osrn.sysnumber=itl1.sysnumber and osrn.itemcode=itl1.itemcode and oitm.mansernum='Y' &
        LEFT JOIN "BEAS_ME" on "BEAS_ME"."ME_ID"="OITM"."InvntryUom" &
        where OIGN.DocEntry = IGN1.DocEntry &
        and OIGN.DocNum = <e_docnum>

    for ll_loop=1 to <dtw.rowcount>
        dtw=setrow=<ll_loop>

        setvar=e_barcode=Ê02<dtw.ign1_itemcode>=Ê310<dtw.anzdez,#><ll_quantity>=Ê21<dtw.obtn_distnumber>=Ê10<dtw.ign1_u_belnrid>
        setvar=e_barcode_text=(02)<dtw.ign1_itemcode>(310<dtw.anzdez,#>)(OT)<dtw.ign1_u_belnrid>(QI)<dtw.itl1_quantity,#0.00>(21)<dtw.obtn_distnumber>(USU)(0)
        
        printobject=openreport=Label.rpt
        printobject=setvar=barcode=<e_barcode>
        printobject=setvar=barcode_text=<e_barcode_text>
        printobject=setvar=title=<dtw.ign1_itemcode>
        printobject=connectioninfo
        printobject=parameter
        printobject=parameter_set
        
        // and select printer
        //setvar=printer=CanonIP
        //tools=printer=getdriversport=<printer>
        //printobject=crreport=selectprinter==<value_printername>=<value_printerport>
        
        //Define number of copies
        //printobject=crreport=copies=3
        
        printobject=crreport=printout
        printobject=disconnect
        
    next

    return success
    end event




    You can find several example os how to print in our beasscript documentation.

    https://help.beascloud.com/script202302/index.html?e-print-with-crystal.htm

    I hope it helps you with your project.

     

  • Jorge Lainez

    Thanks a lot Jesus

    We will tested and We will let you know the results.

    Regards

    Jorge Lainez

Please sign in to leave a comment.