choose printer

Post Reply
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

choose printer

Post by clemerson »

Hi,

Does option exist in the fwh to choose the printer that wants to print?

Clemerson
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

Post by clemerson »

EnricoMaria,

like this me yours to do. I wanted to do before the report the user to choose the printer that wants to print:

Image


Clemerson
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Clemerson,

PRINTER oPrn ... FROM USER
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

Post by clemerson »

Antonio,

here he gave right:
PRINT oPrn FROM USER NAME "Relatório Fechamento..." Preview

and in this example where would put FROM USER?

REPORT oRpt CAPTION "Clientes" TITLE "Cadastro de Clientes" ;
HEADER "Data: " + DToC( Date() ) + ", Hora: " + Time() ;
FOOTER "Página: " + Str( oRpt:nPage, 3 ) ;
PREVIEW
COLUMN TITLE "Código" DATA clientes->Codigo," "," "
COLUMN TITLE "Nome","Endereco","Telefone" DATA clientes->Nome,clientes->Endereco,clientes->telefone
COLUMN TITLE "Cidade","Bairro","Estado" DATA clientes->Cidade,clientes->Bairro,clientes->Estado
END REPORT
ACTIVATE REPORT oRpt FOR SUBST(Clientes->Nome,1,1)>=De .AND. SUBST(Clientes->Nome,1,1)<=Ate .AND. EMPTY(clientes->Convenio)

Clemerson
User avatar
clemerson
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil
Contact:

Post by clemerson »

EnricoMaria wrote:PRINT oPrn ... FROM USER

REPORT oRpt ... TO DEVICE oPrn

EMG
he didn't work:

REPORT oRpt CAPTION "Clientes" TITLE "Cadastro de Clientes" ;
HEADER "Data: " + DToC( Date() ) + ", Hora: " + Time() ;
FOOTER "Página: " + Str( oRpt:nPage, 3 ) ;
TO DEVICE oRpt ;
PREVIEW
.
.
.

Clemerson
areang
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Post by areang »

try this :shock:

REPORT oRpt CAPTION "Clientes" TITLE "Cadastro de Clientes" ;
HEADER "Data: " + DToC( Date() ) + ", Hora: " + Time() ;
FOOTER "Página: " + Str( oRpt:nPage, 3 ) ;
FROM USER ;
PREVIEW

Best Regard
Areang
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

This is a working sample:

Code: Select all

#include "Fivewin.ch"
#include "Report.ch"


FUNCTION MAIN()

    LOCAL oPrn, oRpt

    USE TEST

    PRINT oPrn FROM USER PREVIEW

    REPORT oRpt TO DEVICE oPrn

    COLUMN TITLE "LAST";
           DATA FIELD -> last

    COLUMN TITLE "FIRST";
           DATA FIELD -> first

    END REPORT

    ACTIVATE REPORT oRpt

    CLOSE

    RETURN NIL
EMG
Post Reply