I have two dbf
movimenti.dbf
conti.dbf
I wish when the user select a record the procedure show the data of another dbf into a Folder there is near of the xbrowse
when i scroll the records sometimes I see the data on the folder sometimes i not see the data i not Know why
the function search a field on Conti.dbf , if found it show the data
wehn I scroll the record I call a function on bChange of the xbrowse
oApp():oGrid:bChange := { || (SituazioneConto(oRicerca)) }
oRicerca is the name of variable OF the FOLDER
the SituazioneConto(oRicerca) function
- Code: Select all Expand view
Function SituazioneConto(oRicerca)
Local aGet[10]
Local oFont,oFont2
Local cCccuenta ,;
cCcbanco ,;
cCcncuenta ,;
dCcfapertu ,;
nCcsaldoin ,;
nCcsaldoac
oFont := TFont():New( GetDefaultFontName(), 0, GetDefaultFontHeight(),, )
oFont2 := TFont():New( GetDefaultFontName(), 0, -16,,.t. )
cMovConto:= MV->APCUENTA
SELECT CO
CO->( DbSetOrder( 1 ) )
CO->( DbGoTop() )
if CO->( DbSeek( UPPER( cMovConto ) ) )
cCccuenta := CO->CCCUENTA
cCcbanco := CO->CCBANCO
cCcncuenta := CO->CCNCUENTA
dCcfapertu := CO->CCFAPERTU
nCcsaldoin := CO->CCSALDOIN
nCcsaldoac := CO->CCSALDOAC
@ 60, 10 SAY "Conto:" OF oRicerca:adialogs[1] SIZE 33, 20 PIXEL FONT oFont
@ 60, 102 SAY cCccuenta OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont
@ 80, 10 SAY "Banca:" OF oRicerca:adialogs[1] SIZE 31, 20 PIXEL FONT oFont
@ 80, 102 SAY cCcbanco OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont
@ 100, 10 SAY "Numero Conto:" OF oRicerca:adialogs[1] SIZE 80, 20 PIXEL FONT oFont
@ 100, 102 SAY cCcncuenta OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont
@ 130, 10 SAY "Data Apertura:" OF oRicerca:adialogs[1] SIZE 80, 20 PIXEL FONT oFont
@ 130, 102 SAY dtoc(dCcfapertu) OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont
@ 150, 10 SAY "Saldo Iniziale:" OF oRicerca:adialogs[1] SIZE 80, 20 PIXEL FONT oFont
@ 150, 102 SAY TRANSFORM(nCcsaldoin,"99,999.99") OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont2 RIGHT COLOR IIF(nCcsaldoin>=0,CLR_GREEN,CLR_RED)
@ 180, 10 SAY "Saldo Attuale:" OF oRicerca:adialogs[1] SIZE 80, 20 PIXEL FONT oFont
@ 180, 102 SAY TRANSFORM(nCcsaldoac,"99,999.99") OF oRicerca:adialogs[1] SIZE 110, 20 PIXEL FONT oFont2 RIGHT COLOR IIF(nCcsaldoac>=0,CLR_GREEN,CLR_RED)
oRicerca:Refresh()
endif
SELECT MV
Return nil