Hi,
Does option exist in the fwh to choose the printer that wants to print?
Clemerson
choose printer
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: choose printer
Yes, use the TO clause of the PRINT command.
EMG
EMG
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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
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
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
This is a working sample:
EMG
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