如何在VFP报表底部显示各科平均分
这是设计的成绩显示报表,在每个字段的底部显示各科的平均分,在报表里使用计算均分,显示的不正确,使用avg()提示,无效的下标引用。敬请各位高手指点。
cjform.zip
(6.32 KB)
表.zip
(66.23 KB)
i=39 DO WHILE i<=55 USE &表 SORT TO lin ON aa/d ALL FOR bj=i USE lin AVERAGE aa TO pjaa AVERAGE yy TO pjyy AVERAGE ss TO pjss AVERAGE ee TO pjee ALL FOR ee>0 AVERAGE ww TO pjww ALL FOR ww>0 AVERAGE hh TO pjhh ALL FOR hh>0 AVERAGE zz TO pjbb ALL FOR bb>0 AVERAGE ll TO pjll ALL FOR ll>0 AVERAGE dd TO pjdd ALL FOR dd>0 AVERAGE ru TO pjru ALL FOR ru>0 AVERAGE jp TO pjjp ALL FOR jp>0 REPORT FORM 'cjform.frx' noeject NOCONSOLE TO PRINTER i=i+1 CLOSE DATABASES ENDDO