FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Xbrowse lSeekBar con RELATION TO
Posts: 38
Joined: Tue Jan 22, 2019 08:28 AM

Xbrowse lSeekBar con RELATION TO

Posted: Thu May 13, 2021 11:31 AM
Hola, alguien puede indicarme como hacer lo siguiente;

Estoy relacionando dos bases de datos, con los correspondientes campos indexados, utilizo Xbrowse lSeekBar para poder buscar.

Me permite buscar en todos los campos de la tabla principal pero NO en el campo de la tabla relacionada.

En el ejemplo, no puedo buscar por "State name"

Gracias,
Code (fw): Select all Collapse
#include "fivewin.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()

    local oDlg, oBrw   
    *SetGetColorFocus()
    
    FERASE( "STATES.CDX" )
    Use STATES alias "states" NEW exclusive VIA "DBFCDX"
    FW_CdxCreate()
    Set order to TAG CODE
    go top
    
    FERASE( "CUSTOMER.CDX" )
    Use CUSTOMER alias "customer" NEW exclusive VIA "DBFCDX"
    FW_CdxCreate()  
    go top
    
    SET RELATION to field->state INTO states

    Define Dialog oDlg size 1000,600 PIXEL TRUEPIXEL
    
    @ 10,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
        Columns "FIRST","LAST","CITY","STATE","states->name";
        Headers "First","Last","City","State Code","State Name";
        DATASOURCE "customer" ;
        AUTOCOLS AUTOSORT CELL LINES NOBORDER
    
        WITH OBJECT oBrw
            :nMarqueeStyle := MARQSTYLE_HIGHLROW
            :lSeekBar:= .T.
            :lIncrFilter   := .F.      
            :CreateFromCode()
        END

    Activate dialog oDlg centered
return nil


[img]https://i.ibb.co/mN2y4PT/xbrow2.gif" alt="" loading="lazy">
[/img]
Jorge

--------------------------------------------------

Fivewin 18.10 - Harbour - BCC 7 - PellesC

--------------------------------------------------

Continue the discussion