estou fazendo uma rotina para impressao, mais quando estou compilando aparece a seguinte mensagem
Error: Unresolved external '_HB_FUN_HBPRINTER' referenced from C:\SGHWIN
Inicio do programa faço assim:
#include 'Inkey.ch'
#include 'Minigui.ch'
#include 'Sistema.ch'
#include 'winprint.ch'
esses CH tenho que copiar pra dentro da minha pasta do programa em desenvolvimento,
nao sei se estou certo ???
minha funcao de impressao somente inicio
Function BTN_Imprimir_FOLHA()
Local nLinha := 0
Local nPagina := 1
Local _rend := 0
Local _rend_total:= 0
Local _descontos := 0
Local _qtd := 0
Local _total := 0
Local _fgts := 0
Local _fgts_total:= 0
Close All
UseEventos()
UseFuncionarios()
UseMov()
PRIVATE aPrinters, aports
INIT PRINTSYS
GET PRINTERS TO aprinters
GET PORTS TO aports
RELEASE PRINTSYS
INIT PRINTSYS
SELECT BY DIALOG PREVIEW
// chama caixa de dialogo do windows
// com PREVIEW
If HBPRNERROR>0
return
Endif
Set Page orientation DMORIENT_PORTRAIT papersize DMPAPER_A4 font "f0"
define font "f0" name "courier new" size 12 bold
define font "f1" name "courier new" size 10 bold
define font "f2" name "times new roman" size 30 width 30 bold italic underline strikeout
define font "f3" name "times new roman" size 30 bold
define font "f4" name "times new roman" size 12 bold
define pen "p0" style PS_SOLID width 1 color 0x000000
define pen "p1" style PS_SOLID width 10 color 0xFF0000
define pen "p2" style PS_NULL
define brush "b0" style BS_SOLID color 0xCCFFAA
define brush "b1" style BS_HATCHED color hbprn:dxcolors("YELLOW") hatch HS_DIAGCROSS
define brush "b2" style BS_NULL
Select font "f0"
Select pen "p0"
START DOC NAME "SGH - Repasse a Terceiros"
SELECT PEN "P1"
SELECT BRUSH "B0"
START PAGE
DbSelectArea('Funcionario')
OrdSetFocus('Funcion2')
Funcionario->(DbGoTop())
// EMPRESA ATUAL
Cab_FGTS(nPagina)
@ 05, 05 say 'Folha' FONT 'f0' to PRINT
@ 06, 05, 06, 150 LINE PEN 'P1'
@ 07, 06 say 'Cod' FONT 'f0' TO PRINT
@ 07, 12 Say 'Nome' FONT 'f0' TO PRINT
@ 07, 60 Say 'Valor R$' FONT 'f0' TO PRINT
@ 07, 80 Say 'FGTS' FONT 'f0' TO PRINT
@ 08, 05, 08, 150 LINE PEN 'P1'
nLinha := 9
Do While .not. Eof()
If Funcionario->codemp = Wcodemp
DbSelectArea('Mov')
OrdSetFocus('Mov1')
Mov->(DbGoTop())
Seek str(Wcodemp,2)+substr(Wmesano,3,4)+substr(Wmesano,1,2)+str(Funcionario->codfunc,5)
If Found()
@ nLinha, 05 Say Str(Funcionario->codfunc,5) FONT 'f0' TO PRINT
@ nLinha, 12 Say funcionario->nome FONT 'f0' TO PRINT
Do While !Eof()
DbSelectArea('Evento')
OrdSetFocus('Evento1')
Evento->(DbGoTop())
Evento->(DbSeek(str(Mov->codevento,3)))
DbSelectArea('Mov')
OrdSetFocus('Mov1')
If codemp = Wcodemp .and. anomes = substr(Wmesano,3,4)+substr(Wmesano,1,2) .and.;
codfunc = Funcionario->codfunc .and.;
Evento->tipo = 'R' .and. codevento # 90
nLinha++
@ nLinha, 12 Say codevento FONT 'f0' TO PRINT
@ nLinha, 30 Say valor FONT 'f0' TO PRINT
_rend = _rend + valor
Endif
Mov->(DbSkip())
Enddo
_fgts = _rend * 8 / 100
_fgts_total = _fgts_total + _fgts
@ nLinha,60 say trans(_rend,'@E 9,999.99') FONT 'f0' TO PRINT
@ nLinha,79 say trans(_fgts,'@E 9,999.99') FONT 'f0' TO PRINT
nLinha ++
_rend_total = _rend_total + _rend
_total = _total + _rend_total
_qtd = _qtd + 1
Endif
Endif
_rend = 0
_rend_total = 0
_fgts = 0
DbSelectArea('Funcionario')
OrdSetFocus('Funcion2')
If nLinha >= 64
Rod_FGTS()
END PAGE
START PAGE
nPagina ++
Cab_FGTS(nPagina)
@ 05, 05 say 'Relação de Funcionários - FGTS - Mês/Ano: '+substr(Wmesano,1,2)+'/'+substr(Wmesano,3,4) FONT 'f0' to PRINT
@ 06, 05, 06, 150 LINE PEN 'P1'
@ 07, 06 say 'Cod' FONT 'f0' TO PRINT
@ 07, 12 Say 'Nome' FONT 'f0' TO PRINT
@ 07, 60 Say 'Valor R$' FONT 'f0' TO PRINT
@ 07, 80 Say 'FGTS' FONT 'f0' TO PRINT
@ 08, 05, 08, 150 LINE PEN 'P1'
nLinha := 9
Endif
Funcionario->(DbSkip())
Enddo
@ nLinha,05 ,nLinha, 150 LINE PEN 'P1'
nLinha ++
@ nLinha,10 say trans(_qtd,'@E 99999') FONT 'f0' TO PRINT
@ nLinha,55 say trans(_total,'@E 9,999,999.99') FONT 'f0' TO PRINT
@ nLinha,74 say trans(_fgts_total,'@E 9,999,999.99') FONT 'f0' TO PRINT
Rod_FGTS()
END DOC
RELEASE PRINTSYS
RETURN
*---------------------------
Function Cab_FGTS(pPagina)
@ 01, 05 Say WEmpresa FONT 'f0' to print
@ 02, 05 Say WSistema FONT 'f0' to PRINT
@ 02, 50 Say 'Emissão: '+DtoC(Date()) FONT 'f0' to PRINT
@ 02, 80 Say 'Página: '+StrZero(pPagina,3) FONT 'f0' TO PRINT
@ 03, 05, 03, 150 LINE PEN 'P1'
Return(Nil)
*---------------------------
Function Rod_FGTS()
@ 66, 05, 66, 150 LINE PEN 'P1'
@ 67, 05 Say 'Impresso em '+DtoC(Date())+' as '+Time() TO PRINT
Return(Nil)
*---------------------------------------------------------------------------