choose printer

choose printer

Postby clemerson » Mon Jul 31, 2006 2:10 pm

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

Re: choose printer

Postby Enrico Maria Giordano » Mon Jul 31, 2006 2:57 pm

Yes, use the TO clause of the PRINT command.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby clemerson » Mon Jul 31, 2006 7:52 pm

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
clemerson
 
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil

Postby Antonio Linares » Mon Jul 31, 2006 7:55 pm

Clemerson,

PRINTER oPrn ... FROM USER
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby clemerson » Mon Jul 31, 2006 8:16 pm

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

Postby Enrico Maria Giordano » Mon Jul 31, 2006 8:22 pm

PRINT oPrn ... FROM USER

REPORT oRpt ... TO DEVICE oPrn

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby clemerson » Mon Jul 31, 2006 8:34 pm

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
User avatar
clemerson
 
Posts: 58
Joined: Fri Mar 10, 2006 8:13 pm
Location: Brazil

Postby areang » Tue Aug 01, 2006 4:22 am

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
areang
 
Posts: 128
Joined: Mon Jul 31, 2006 3:23 pm

Postby Enrico Maria Giordano » Tue Aug 01, 2006 7:06 am

This is a working sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 73 guests