二、示例代码
SET TALK OFF
CLOSE DATABASES ALL
ASTACKINFO(aPrg)
SET DEFAULT TO ADDBS(JUSTPATH(aPrg[2]))
CREATE CURSOR B0 (f0 I)
INSERT INTO B0 VALUES (1)
CREATE CURSOR B1 (f0 I, f1 I)
INSERT INTO B1 VALUES (1, 11)
INSERT INTO B1 VALUES (1, 12)
INSERT INTO B1 VALUES (1, 13)
INSERT INTO B1 VALUES (1, 14)
INDEX on f0 TAG f0
CREATE CURSOR B2 (f0 I, f1 I)
INSERT INTO B2 VALUES (1, 21)
INSERT INTO B2 VALUES (1, 22)
INSERT INTO B2 VALUES (1, 23)
INSERT INTO B2 VALUES (1, 24)
INSERT INTO B2 VALUES (1, 25)
INSERT INTO B2 VALUES (1, 26)
INDEX on f0 TAG f0
SELECT B0
SET RELATION TO f0 INTO B1
SET RELATION TO f0 INTO B2 ADDITIVE
REPORT FORM 多细节区报表.frx PREVIEW
CLOSE DATABASES ALL 运行效果:(不会贴图,用字符表示)
标题1*********************** B1数据 11 12 13 14
----------------------------
SET TALK OFF
CLOSE DATABASES ALL
ASTACKINFO(aPrg)
SET DEFAULT TO ADDBS(JUSTPATH(aPrg[2]))
CREATE CURSOR B0 (f0 I)
INSERT INTO B0 VALUES (1)
CREATE CURSOR B1 (f0 I, f1 I)
INSERT INTO B1 VALUES (1, 11)
INSERT INTO B1 VALUES (1, 12)
INSERT INTO B1 VALUES (1, 13)
INSERT INTO B1 VALUES (1, 14)
INDEX on f0 TAG f0
CREATE CURSOR B2 (f0 I, f1 I)
INSERT INTO B2 VALUES (1, 21)
INSERT INTO B2 VALUES (1, 22)
INSERT INTO B2 VALUES (1, 23)
INSERT INTO B2 VALUES (1, 24)
INSERT INTO B2 VALUES (1, 25)
INSERT INTO B2 VALUES (1, 26)
INDEX on f0 TAG f0
SELECT B0
SET RELATION TO f0 INTO B1
SET RELATION TO f0 INTO B2 ADDITIVE
REPORT FORM 多细节区报表.frx PREVIEW
CLOSE DATABASES ALL