Paulo1361303230 Posted July 23, 2005 Report Share Posted July 23, 2005 Bom dia Amigos! Estou querendo emitir um relatório de preços que contenham Código,Descrição,Fabricante,Setor (St), Espécie (Es), Lista (+-), Preço de Venda e Última Venda. Até aà tudo bem, o relatório está sendo impresso corretamente. Porem, gostaria de eliminar alguns setores correspondentes à determinados produtos sem utilizar o comando "Set filter", pois o referido comando já está sendo utilizado para outro tipo de filtragem. Quero eliminar alguns setores (Exemplo) tipo "CP", "BO","CT". No relatório tradicional (tdosprn) eu utilizo`:- if setor=´CP´ skip loop elseif setor=´BO´ skip loop elseif setor=´CT´ skip loop endif Mas no relatório conforme fonte em anexo não estou conseguindo, portanto alguem teria alguma idéia em como proceder? Atencipadamente agradeço Obrigado Paulo ************************* static function relpregj ************************ #include "report.ch" STATIC oReport LOCAL oFont1, oFont2 DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10 && Fonte Arial DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD && Fonte Arial Bold prod_nom:=descric if wlista<>'CV' set filter to tipo=wlista endif REPORT oReport TITLE alltrim(relraz) ; FONT oFont1, oFont2 ; PREVIEW COLUMN TITLE "codprod" DATA codprod COLUMN TITLE "Descrição do Produto" DATA descric COLUMN TITLE "Fabricante" DATA nomlabo COLUMN TITLE "St" DATA tipopro COLUMN TITLE "Es" DATA tipclas COLUMN TITLE "+-" DATA tipo total COLUMN TITLE "Preço/Venda" DATA valvend COLUMN TITLE "Ult. Venda" DATA dataven GROUP OFF descric ; FOOTER "Total de Itens "+oReport:aGroups[1]:cValue+ ; " ("+ltrim(str(oReport:aGroups[1]:nCounter))+")" ; FONT 2 ; EJECT END REPORT ACTIVATE REPORT oReport oFont1:End() oFont2:End() seek prod_nom return .t. Quote Link to comment Share on other sites More sharing options...
pauloaraujo Posted July 23, 2005 Report Share Posted July 23, 2005 Xará, Bom dia Por que voce não pode UTILIZAR o próprio SET FILT??? if wlista<>'CV' set filter to tipo=wlista .AND. AT(setor,"CP;BO;CT;")=0 else set filter to AT(setor,"CP;BO;CT;")=0 endif Paulo/CONTATO SISTEMAS Clipper53b / FW26 / Blinker70 Ajudar é um prazer, agradecer é uma obrigação Editado por - pauloaraujo on 23/07/2005 11:39:59 Quote Link to comment Share on other sites More sharing options...
Paulo1361303230 Posted July 23, 2005 Author Report Share Posted July 23, 2005 Muito obrigado pela dica Paulo, vou tentar. Paulo Quote Link to comment Share on other sites More sharing options...
Kleyton Posted July 23, 2005 Report Share Posted July 23, 2005 Paulo, grave os dados que passaram pela sua filtragem em um arquivo (DBF) temporário, depois imprima do arquivo temporário... Kleyton Clipper5.2E+Clipper5.3b+Blink7+FW2.0d cleitonbala@bol.com.br Quote Link to comment Share on other sites More sharing options...
Paulo1361303230 Posted July 23, 2005 Author Report Share Posted July 23, 2005 Valeu Kleyton Obrigado Paulo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.