|
Postada em 19/10/2007 18:46 hs
Eu vou colocar um exemplo do relatório ! cod descricao valor 123 teste 6,80 Complemento valor do custo data movimento furo 1,80 12/10/2007 montar 2,30 12/10/2007 embalar 1,20 13/10/2007 --------- 5,30 Toral = 12,10 _________________________________________________________________ cod descricao valor 124 teste1 6,00 Complemento valor do custo data movimento furo central 2,80 12/10/2007 montar com pregos 1,30 12/10/2007 embalar e cortar 3,20 13/10/2007 --------- 8,30 Total = 14,30 ___________________________________________________________________ ? ? ? Etc ... Entendeu ? Obrigado
|
|
|
|
|
|
|
Postada em 22/10/2007 14:22 hs
Não tem como eu testar mas veja se ajuda aí: dim bflag as boolean rs.sort = "cod ASC" bflag =false DO while no RS.EOF IF strCOD <> RS("COD") THEN IF bflag then Printer.FontBold = True Printer.CurrentX = 70: Printer.Print "Total de Custo(s)"; Printer.CurrentY = Printer.CurrentY + 5 Printer.CurrentX = 1: Printer.Print "Total do(s) Custo(s)"; Printer.FontBold = False Printer.CurrentX = 80: Printer.Print Format(Total, "R$ "##,##00.00"); Printer.CurrentY = Printer.CurrentY + 2 Printer.CurrentX = 1: Printer.Print String(95, "_"); ENDIF PRINTER.PRINT PRINTER.PRINT RS("COD"); RS("DESCRICAO"); RS("VALOR") strCOD = RS("COD") bflag = true ENDIF PRINTER.PRINT RS("COMPLEMENTO");RS("VALOR_CUSTO");RS("DATA") DesCusto = rs("COMPL_CUSTO") VlCusto = rs("VALOR") DtMovim = rs("DATA_MOVTO") Printer.CurrentX = 1: Printer.Print DesCusto; Printer.CurrentX = 129: Printer.Print Format(VlCusto, "##,##00.00"); Printer.CurrentX = 169: Printer.Print DtMovim Printer.CurrentY = Printer.CurrentY - 5.5 Soma = Soma + VlCusto Total = VlCompra + Soma Printer.CurrentY = Printer.CurrentY + 0.8 Printer.CurrentX = 120: Printer.Print String(17, "_"); Printer.CurrentY = Printer.CurrentY + 5 Printer.CurrentX = 129: Printer.Print Format(Soma, "##,##00.00"); RS.MOVENEXT LOOP
|
|
|
Moreti
|
SÃO PAULO SP - BRASIL
|
|
ENUNCIADA !
|
|
|
Postada em 22/10/2007 21:49 hs
Acho eu você não está entendendo o que quero, mas mesmo assim obrigado por tentar me ajudar. É o seguinte, da forma que você está falando eu entendo, acontece que vai acontecer apenas para um único item ! São vários itens, cada item tem que ter o seu total, então vamos supor que eu tenho 10 itens, logo terei que ter 10 totais. Acho que agora expliquei melhor! Obrigado
|
|
|
|
Postada em 23/10/2007 09:46 hs
Moreti Bom Dia
Moreti, pelo que pude entender, você tem um serviço e para cada item são incluídos vários serviços nele. O que você pode fazer é colocar um if para comparar guando a descrição for diferente, e quando for ai você passa um traço e da o total geral. Ficaria algo assim, como não sei os seus campos eu vou colocar um exemplo e vou colocar apenas como ficaria a comparação, pois o resto não tem o que mudar, ok?!
Dim descricao descricao=campo!descricao
Inicia o processo de impressão . . . até a comparação if descricao=campo!descricao then imprimir o serviço desse item somar ao total geral move para o próximo else passa um traço exibi o total caso tenha mais algum registro a ser impresso descricao=campo!descricao endif
Abraço e que DEUS te abençõe, espero poder ter te ajudado  Eu sou o Senhor, o DEUS de vocês; eu os seguro pela mão e lhes digo; Não fiquem com medo, pois eu os ajudo Isaias 41:13
|
|
|
|
Postada em 23/10/2007 09:52 hs
Como está vindo na tabela?
|
|
|
|