FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour filtering using set scope..pls help
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
filtering using set scope..pls help
Posted: Thu Apr 13, 2006 05:03 PM
I need to adjust the program below to be used with set scope instead of set filter .


STATIC FUNCTION mete( oWnd )
*--------------------------
   local oChild, oBrw
   local nFor
   local bFilter := ""
   local cFilter := "" 
   local x := ""
 
REQUEST ADS 
rddRegister( "ADS", 1 ) 
rddsetdefault( "ADS" ) 
AdsSetDeleted(.T.) 
SET SERVER LOCAL 
SET FILETYPE TO CDX 

select 4 
USE METE 

x := "'9855564'" 

cFilter := "me_mc_serl = "+ x 

bFilter = "{||"+cFilter+"}" 

DBSETFILTER(bFilter,cFilter) 
DBGOTOP() 

 

   DEFINE WINDOW oChild FROM 4, 4 TO 25, 75 ;
   TITLE "Meter Works" 

   oBrw := TXBrowse():New( oChild )

   oBrw:nMarqueeStyle       := MARQSTYLE_HIGHLCELL
   oBrw:nColDividerStyle    := LINESTYLE_BLACK
   oBrw:nRowDividerStyle    := LINESTYLE_BLACK
   oBrw:lColDividerComplete := .t.
   oBrw:nHeaderLines        := 1 
   oBrw:nFooterLines        := 1
   oBrw:nDataLines          := 2
   oBrw:lFooter             := .t.
   oBrw:SetRDD()

 

   for nFor := 1 to Fcount()
   if nFor=20
      oBrw:aCols[ nFor ]:cHeader       := FieldName( nFor )
      oBrw:aCols[ nFor ]:cFooter       := alltrim(STR(TOTALEM2(),12,0))
      loop
   endif
      oBrw:aCols[ nFor ]:cHeader       := FieldName( nFor ) 
      oBrw:aCols[ nFor ]:cFooter       := FieldName( nFor )
   next

 


   oBrw:CreateFromCode()

   oChild:oClient := oBrw

   ACTIVATE WINDOW oChild MAXIMIZED ON INIT oBrw:SetFocus()

RETURN NIL
Posts: 142
Joined: Sun Oct 09, 2005 10:59 AM
filtering using set scope..pls help
Posted: Mon Apr 17, 2006 09:50 AM

cFilter := "me_mc_serl = "+ x

bFilter = "{||"+cFilter+"}"

DBSETFILTER(bFilter,cFilter)

bFilter isn't a codeblock , macro expansion ?????????????

Frank

Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
filtering using set scope..pls help
Posted: Mon Apr 17, 2006 06:23 PM

believe me was macro also filter does not work with RDD server . pls if you know the syntax of set scope tell me ?

Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
filtering using set scope..pls help
Posted: Mon Apr 17, 2006 06:24 PM

DBSETFILTER (&bFilter,cFilter)..... you forgot the "&" in the macro expression

Saludos

R.F.

Continue the discussion