Would you help us, we need make a tree in a xBrowse, this is our
code but it does not show us the records, why?
Code: Select all
#include "fivewin.ch"
#Include "Ado.ch"
FUNCTION TestTree()
LOCAL oRsLoc, oDlg, oFont, oBrw
oRsLoc := FW_OpenRecordSet(oApp:oCon,"SELECT " +;
"* " +;
"FROM " +;
"Locales ",;
"ORDER BY " +;
"LOC_CAL,LOC_LOC",adLockOptimistic,adOpenDynamic,0)
oRsLoc:MoveFirst()
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg RESOURCE "TestTree"
REDEFINE XBROWSE oBrw ID 200 OF oDlg;
DATASOURCE oRsLoc;
COLUMNS "LOC_CAL","LOC_LOC","LOC_GAS","LOC_LUZ","LOC_AGU","LOC_REN";
HEADERS "Calle/Local","Local","Gastos","Luz","Agua","Arriendo";
CELL LINES NOBORDER
WITH OBJECT oBrw
:SetTree( 2 )
:oTree:OpenAll()
:lDisplayZeros := .f.
END
ACTIVATE DIALOG oDlg CENTERED
oFont:END()
RETURN(NIL)