filtering using set scope..pls help

filtering using set scope..pls help

Postby Ehab Samir Aziz » Thu Apr 13, 2006 5:03 pm

I need to adjust the program below to be used with set scope instead of set filter .


Code: Select all  Expand view  RUN

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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby Frank Demont » Mon Apr 17, 2006 9:50 am

cFilter := "me_mc_serl = "+ x

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

DBSETFILTER(bFilter,cFilter)

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


Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby Ehab Samir Aziz » Mon Apr 17, 2006 6: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 ?
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby R.F. » Mon Apr 17, 2006 6:24 pm

DBSETFILTER (&bFilter,cFilter)..... you forgot the "&" in the macro expression
Saludos
R.F.
R.F.
 
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 78 guests