Hi,
I use xbrowse filter like this:
oCheque:OrdScope(0,Nil)
oCheque:OrdScope(1,Nil)
oBrwCh:Refresh()
oCheque:SetOrder("NCHEQUE")
oCheque:OrdScope(0,Rec1)
oCheque:OrdScope(1,Rec2)
oBrwCh:Refresh()
When I try to clear filter one empty line apear in xbrowse, if i click inside a browse the line disapear, why i do wrong?
oCheque:OrdScope(0,Nil)
oCheque:OrdScope(1,Nil)
xSetFocus(oBrwCh)
oBrwCh:Refresh()
Thanks!
Filter doubt in xbrowse
Re: Filter doubt in xbrowse
A sample that works fine for me during the years
1. Customer browser
2. Services of a customer ( shows only the customer selected from DBF 1 )
// get the name from customer.dbf
WITH OBJECT oBrw1 // Customer
:bChange := { || SET_SCOPE(cMonth) ; // set the customer-filter in browser 2 services
oBrw2:Refresh()} // refresh services DBF 2
END
oBrw2 shows services of the selected customer
// ------- called on customer-change in DBF 1 -------------------------
STATIC FUNCTION SET_SCOPE(cMonth) // the selected service-DBF ( Jan - Dec )
LOCAL cNName := UPPER((CUSTOMER)->NAME1) + UPPER((CUSTOMER)->NAME) // the cusomer name from DBF 1 to filter DBF 2
DBSELECTAREA( cMonth ) // DBF 2
(cMonth)->( ORDSCOPE( 0, NIL ) )
(cMonth)->( ORDSCOPE( 1, NIL ) )
(cMonth)->( ORDSCOPE(0, cNName ) ) // name of the customer from DBF 1
(cMonth)->( ORDSCOPE(1, cNName ) )
RETURN NIL
regards
Uwe
1. Customer browser
2. Services of a customer ( shows only the customer selected from DBF 1 )
// get the name from customer.dbf
WITH OBJECT oBrw1 // Customer
:bChange := { || SET_SCOPE(cMonth) ; // set the customer-filter in browser 2 services
oBrw2:Refresh()} // refresh services DBF 2
END
oBrw2 shows services of the selected customer
// ------- called on customer-change in DBF 1 -------------------------
STATIC FUNCTION SET_SCOPE(cMonth) // the selected service-DBF ( Jan - Dec )
LOCAL cNName := UPPER((CUSTOMER)->NAME1) + UPPER((CUSTOMER)->NAME) // the cusomer name from DBF 1 to filter DBF 2
DBSELECTAREA( cMonth ) // DBF 2
(cMonth)->( ORDSCOPE( 0, NIL ) )
(cMonth)->( ORDSCOPE( 1, NIL ) )
(cMonth)->( ORDSCOPE(0, cNName ) ) // name of the customer from DBF 1
(cMonth)->( ORDSCOPE(1, cNName ) )
RETURN NIL
regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: Filter doubt in xbrowse
Thank you!ukoenig wrote:A sample that works fine for me during the years
1. Customer browser
2. Services of a customer ( shows only the customer selected from DBF 1 )
// get the name from customer.dbf
WITH OBJECT oBrw1 // Customer
:bChange := { || SET_SCOPE(cMonth) ; // set the customer-filter in browser 2 services
oBrw2:Refresh()} // refresh services DBF 2
END
oBrw2 shows services of the selected customer
// ------- called on customer-change in DBF 1 -------------------------
STATIC FUNCTION SET_SCOPE(cMonth) // the selected service-DBF ( Jan - Dec )
LOCAL cNName := UPPER((CUSTOMER)->NAME1) + UPPER((CUSTOMER)->NAME) // the cusomer name from DBF 1 to filter DBF 2
DBSELECTAREA( cMonth ) // DBF 2
(cMonth)->( ORDSCOPE( 0, NIL ) )
(cMonth)->( ORDSCOPE( 1, NIL ) )
(cMonth)->( ORDSCOPE(0, cNName ) ) // name of the customer from DBF 1
(cMonth)->( ORDSCOPE(1, cNName ) )
RETURN NIL
regards
Uwe