Jump to content
Fivewin Brasil

Relatório com eliminação setorial (Report)


Paulo1361303230

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...