I need your valuable help to build a TREE on a BROWSE, I have a table with the following structure
- Code: Select all Expand view
cCmdSql := "CREATE TABLE IF NOT EXISTS Cierre(" +;
"CIE_NI1 DECIMAL(02,0) NOT NULL DEFAULT 0 COMMENT 'Primer nivel'," +;
"CIE_NI2 DECIMAL(02,0) NOT NULL DEFAULT 0 COMMENT 'Segundo nivel'," +;
"CIE_NI3 DECIMAL(02,0) NOT NULL DEFAULT 0 COMMENT 'Tercer nivel'," +;
"CIE_NI4 DECIMAL(02,0) NOT NULL DEFAULT 0 COMMENT 'Cuarto nivel'," +;
"CIE_NI5 DECIMAL(02,0) NOT NULL DEFAULT 0 COMMENT 'Quinto nivel'," +;
"CIE_DES VARCHAR(70) NOT NULL DEFAULT '' COMMENT 'Cierre de proyecto'," +;
"CIE_PRE DECIMAL(15,2) NOT NULL DEFAULT 0.00 COMMENT 'Presupuesto'," +;
"CIE_GAS DECIMAL(15,2) NOT NULL DEFAULT 0.00 COMMENT 'Gastado'," +;
"CIE_DIF DECIMAL(15,2) NOT NULL DEFAULT 0.00 COMMENT 'Diferencia'," +;
"PRIMARY KEY(CIE_NI1,CIE_NI2,CIE_NI3,CIE_NI4,CIE_NI5))" +;
"ENGINE = InnoDB COMMENT 'Cierre de proyecto';"
The TREE must be built by the first 5 fields (CIE1,CIE2,CIE3,CIE4,CIE5),
and in the end be able to print it exactly as the branches are, open or closed
I have seen the examples\tree.prg but it is built with arrays.
If you have time to help me, I will send you the CIERRE table full of records
Here is an image of the content of the CIERRE table
Your help will be greatly appreciated.
Best regards