(一个简单例子仅供参考)
bb.zip
(3.8 KB)
[此贴子已经被作者于2020-10-28 17:12编辑过]
[此贴子已经被作者于2020-10-28 20:49编辑过]
CREATE CURSOR bb (b1 I,b2 I,b3 I,hj I) CREATE CURSOR tt (f1 I,f2 I,f3 I,f4 I,f5 I) INSERT INTO tt VALUES (1,2,3,4,5) INSERT INTO tt VALUES (21,22,23,24,25) INSERT INTO tt VALUES (31,32,33,34,35) cf = FIELD(1,"tt") nf = 2 DO WHILE nf <= FCOUNT("tt") cf = cf + ",f"+TRANSFORM(nf) IF nf%3 == 0 && 假设每页3个栏目 print_bb(cf) nf = nf + 1 cf = FIELD(nf,"tt") ENDIF nf = nf + 1 ENDDO IF !EMPTY(cf) print_bb(cf) ENDIF RETURN FUNCTION print_bb(cf) SELECT tt COPY TO ARRAY arr FIELDS &cf SELECT bb ZAP APPEND FROM ARRAY arr REPLACE ALL hj WITH b1+b2+b3 BROWSE && 这句改为报表输出 ENDFUNC