我是想实现以下的报表结果,不知道版主有什么高招。
SET SAFETY OFF
SELECT 批次,COUNT(批次) xh from d:\desktop\df4 INTO table df3 group by 批次
SELECT 批次,生产号,INT(VAL('000')) xh from d:\desktop\df4 INTO table df5
group by 批次,生产号
SELECT df3
SCAN
UPDATE df5 SET df5.xh=df3.xh WHERE df5.批次=df3.批次
ENDSCAN
SELECT df5
REPORT FORM d:\desktop\报表df4.frx
PREVIEW NOCONSOLE
USE IN df5
USE IN df4
USE IN df3