下列代码红字部分出现问题(第三层节点:“性别” 不出现),请高手指教。万分感谢!!!
case Scfs=1
thisform.olecontrol1.LINESTYLE=1
THISform.olecontrol1.STYLE=7
Thisform.OleControl1.Nodes.Clear
SELECT distinct 年级 FROM cjhzb into CURSOR temp
SCAN
thisform.olecontrol1.Nodes.Add(,,'年级'+ALLTRIM(年级),年级)
SELECT DISTINCT 班级 FROM cjhzb WHERE cjhzb.年级=TEMP.年级 INTO CURSOR TEMP1
SELECT temp1
SCAN
thisform.OleControl1.Nodes.Add('年级'+ALLTRIM(temp.年级),4,'班级'+ALLTRIM(temp.年级)+ALLTRIM(班级),班级)
SELECT distinct 性别 FROM cjhzb WHERE cjhzb.年级=Temp.年级 AND cjhzb.班级=Temp1.班级 INTO CURSOR temp2
SELECT temp2
SCAN
thisform.olecontrol1.Nodes.Add('班级'+ALLTRIM(temp1.班级),4,'性别'+ALLTRIM(temp1.班级)+ALLTRIM(性别),性别)
ENDSCAN
USE IN temp2
SELECT temp1
ENDSCAN
USE IN temp1
SELECT temp
ENDSCAN
USE IN temp
thisform.olecontrol1.refresh
case Scfs=1
thisform.olecontrol1.LINESTYLE=1
THISform.olecontrol1.STYLE=7
Thisform.OleControl1.Nodes.Clear
SELECT distinct 年级 FROM cjhzb into CURSOR temp
SCAN
thisform.olecontrol1.Nodes.Add(,,'年级'+ALLTRIM(年级),年级)
SELECT DISTINCT 班级 FROM cjhzb WHERE cjhzb.年级=TEMP.年级 INTO CURSOR TEMP1
SELECT temp1
SCAN
thisform.OleControl1.Nodes.Add('年级'+ALLTRIM(temp.年级),4,'班级'+ALLTRIM(temp.年级)+ALLTRIM(班级),班级)
SELECT distinct 性别 FROM cjhzb WHERE cjhzb.年级=Temp.年级 AND cjhzb.班级=Temp1.班级 INTO CURSOR temp2
SELECT temp2
SCAN
thisform.olecontrol1.Nodes.Add('班级'+ALLTRIM(temp1.班级),4,'性别'+ALLTRIM(temp1.班级)+ALLTRIM(性别),性别)
ENDSCAN
USE IN temp2
SELECT temp1
ENDSCAN
USE IN temp1
SELECT temp
ENDSCAN
USE IN temp
thisform.olecontrol1.refresh
[此贴子已经被作者于2022-5-10 07:44编辑过]