1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Impressão LPT1 x USB

Discussão em 'Progress 4GL' iniciado por kuki007, Maio 25, 2009.

  1. kuki007

    kuki007 Sem Pontuação

    Tenho a impressora conectada diretamente no micro via USB, sendo que ela esta compartilhada. Ao executar o programa abaixo não sai na impressora, fica o trabalho preso.

    Sendo assim, tentei fazer um teste e instalar a impressora em LPT1 e funcionou perfeitamente. E em impressoras via rede também funciona corretamente.

    O que poderia ser o problema?

    Segue abaixo o exemplo bem simples...

    output to "\\micro01\jato-adm".

    form "CODIGO ITEM" at 001
    "PERIODO" at 020
    "ESTABEL" at 035
    "DEPOSITO" at 045
    "QUANTIDADE" at 060 skip (1)
    with width 132 frame f-corp-cab down stream-io no-box no-labels.

    form sl-it-per.it-codigo at 001
    sl-it-per.periodo at 020
    sl-it-per.cod-estabel at 035
    sl-it-per.cod-depos at 045
    sl-it-per.quantidade at 055
    with width 132 frame f-corp-ped down stream-io no-box no-labels.

    disp with frame f-corp-cab .
    down with frame f-corp-cab.

    for each sl-it-per
    where sl-it-per.it-codigo = "100001" .

    disp sl-it-per.it-codigo
    sl-it-per.periodo
    sl-it-per.cod-estabel
    sl-it-per.cod-depos
    sl-it-per.quantidade
    with frame f-corp-ped.
    down with frame f-corp-ped.
    end.

    output to close.
  2. TeD

    TeD Membro Participativo

    Boa Tarde,

    Verifique se o kbase abaixo se aplica ao seu caso

    Unable to print from Progress using a printer with a USB port
    Autor: Progress Software Corporation

    SYMPTOM(s):

    Unable to print from Progress using a printer with a USB port

    Using command "OUTPUT TO PRINTER"

    No errors happens

    Nothing is printed

    The job in the print queue is deleted

    Printing from windows works with no problems

    Printing from DOS using type > printer name works fine

    Lexmark, HP Deskjet, Epson Inkjet printersn are using a USB port

    FACT(s) (Environment):

    Windows
    Progress 9.x

    CAUSE:

    The client parameters -Wa -wpp are being used.

    FIX:

    Remove the client startup parameters -Wa -wpp. These settings enable Windows Passthrough Printing mode. They work for a parallel printer, but not a USB printer.
  3. TeD

    TeD Membro Participativo

    Encontrei um outro kbase que explica a respeito da impressão utilizando uma impressora USB.
    Fiz um teste aqui utilziando output to printer value(c-imrpessora) e funcionou..

    How to print to a USB printer using 4GL?
    Autor: Progress Software Corporation

    GOAL:

    How to print to a USB printer.

    FACT(s) (Environment):

    Progress 9.x
    OpenEdge 10.x

    FIX:

    The following 4GL OUTPUT statement should be used to print to a USB printer:

    OUTPUT TO PRINTER "<PrinterName>" or if the printer is local
    OUTPUT TO PRINTER "<UNCPrinterName>" if the printer is shared networked
    where <PrinterName> is the local or network UNC printer name. In the following example, it is assumed that the USB printer is the session printer:

    Código:
    DEFINE VARIABLE i AS INTEGER NO-UNDO.
    DEFINE VARIABLE c AS CHARACTER NO-UNDO.
    
    ASSIGN c = SESSION:PRINTER-NAME.
    
    OUTPUT TO PRINTER VALUE(c).
    
    REPEAT WHILE i < 10:
    DISPLAY "This is test line number " i.
    ASSIGN i = i + 1.
    END.
    
    OUTPUT CLOSE.
    
  4. kuki007

    kuki007 Sem Pontuação

    Funcionou, porém como faço para a impressão ficar condensada, bem formatada.

    Att,

    Anderson.
  5. sl4v3r

    sl4v3r Membro Participativo

    Prezados,

    Quando postar codigos favor utilizar a tag Code.

    Com Code
    Código:
    message "teste" view-as alert-box.
    Sem Code
    message "teste" view-as alert-box.

Compartilhe esta Página