1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

ARGOX - COD BARRAS - ETIQUETAS

Discussão em 'Progress 4GL' iniciado por Alexandre, Julho 30, 2014.

  1. Alexandre

    Alexandre Membro Participativo

    BOA TARDE

    ESTOU TENTANDO IMPRIMIR CODIGOS DE BARRAS NA ETIQUETA:

    ESTA SOH IMPRIMINDO ISSO:
    &f0S*c100G*c05a100bP*p+15X*c

    E NADA DE CODIGO DE BARRAS.
    ALGUEM PODE ME AJUDAR?

    SEGUE O FONTE:




    DEFINE VARIABLE cd-bar AS CHARACTER NO-UNDO.
    DEFINE VARIABLE bar-code-string AS CHARACTER NO-UNDO.
    Run bar-code-39 (input String("1121212121"),
    input "P0510100",
    output bar-code-string).

    Procedure bar-code-39:
    def input parameter input-string as char no-undo.
    def input parameter code-spec as char no-undo.
    def output parameter bar-code-string as char no-undo.
    def var clr as log init true no-undo.
    def var wk as char no-undo.
    def var drw as char no-undo.
    def var dir as char no-undo.
    def var k as char no-undo.
    def var att as char no-undo.
    def var kod as char no-undo
    init "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ.Ï *$/+%".
    ASSIGN att =
    "100100001001100001101100000000110001100110000001110000000100101100100100"
    + "001100100000110100100001001001001001101001000000011001100011000001011000"
    + "000001101100001100001001100000011100100000011001000011101000010000010011"
    + "100010010001010010000000111100000110001000110000010110110000001011000001"
    + "111000000010010001110010000011010000010000101110000100011000100010010100"
    + "010101000010100010010001010000101010".
    def var i as int no-undo.
    def var j as int no-undo.
    def var l as int no-undo.
    def var brd as int no-undo.
    def var jst as int no-undo.
    assign
    i = if substring (code-spec, 1, 1) = "P" then 1 else 2
    bar-code-string = "~E&f0S~E*c100G"
    drw = substring ("ab", i, 1)
    + substring (code-spec, 6)
    + substring ("ba", i, 1) + "P"
    dir = substring ("XY", i, 1)
    k = "*" + input-string + "*".
    do i = 1 to length (k):
    assign
    j = index (kod, substring (k, i, 1)) * 9 - 8
    wk = substring (att, j, 9) + "0"
    .
    do l = 1 to 10:
    assign
    brd = if substring(wk,l,1) = "0" then 2 else 4
    bar-code-string = bar-code-string
    + (if clr then "~E*c" + substring (code-spec, brd, 2) + drw
    else "~E*p+" + string (integer (substring (code-spec, brd, 2))
    + jst) + dir)
    jst = integer (substring (code-spec, brd, 2))
    clr = not clr
    .
    end. /* of looping 1 to 10 */
    end. /* of going through string 'k' */

    assign
    bar-code-string = bar-code-string + "~E&f1S"
    wk = "".
    end.

    FIND FIRST imprsor_usuar
    WHERE imprsor_usuar.cod_usuario = "super"
    AND imprsor_usuar.nom_impressora = "termica" NO-LOCK NO-ERROR.
    IF AVAIL imprsor_usuar THEN DO:
    OUTPUT TO VALUE(imprsor_usuar.nom_disposit_so).

    PUT control chr(02) + "L".
    PUT control chr(13).
    PUT skip.
    put control chr(02) + "m".
    put control chr(13).
    put skip.
    put "H18". /* Temperatura */
    put control chr(13).
    put skip.
    put "D11".
    put control chr(13).
    put skip.
    put "R0000".
    put control chr(13).
    put skip.
    put "C0020".
    put control chr(13).
    put skip.
    put "U".
    put control chr(13).
    put skip.


    PUT "191100201250020" bar-code-string format "x(44)".
    put control chr(13).
    PUT SKIP.
    put "U".
    put control chr(13).
    put skip.
    put "E".
    put control chr(13).
    put skip.
    output CLOSE.
    END.
  2. Eilleen

    Eilleen Membro Ativo

    Boa tarde! Pode não ser isso, maaaaassss.... já verificou se a fonte do código de barras está instalada no pc que está executando a impressão?
  3. Alexandre

    Alexandre Membro Participativo

    oi sim fonte instalado!
    :(
  4. Eilleen

    Eilleen Membro Ativo

    Alexandre, não tenho como testar aqui agora pra saber se é isso, mas nunca usamos o CHR(13) e SKIP juntos na Argox, somente SKIP... Não sei se é o suficiente pra ter dado o problema, mas tirando isso que fazemos diferente, os comandos parecem estar corretos.
    Alexandre curtiu isso.
  5. Eilleen

    Eilleen Membro Ativo

    Ahh, tem mais um detalhe... Você usou comandos de PPLA e PPLB juntos, também não fazemos isso e sinceramente não sei se é "possível"... Infelizmente não dá pra testar aqui senão eu já te falava se essas coisas que vi são realmente problemas... Sorry...
    Alexandre curtiu isso.
  6. Alexandre

    Alexandre Membro Participativo

    Obrigado #Eilleen

Compartilhe esta Página