只是合计的问题。加另外一个datasetcount,在每页合计标签beforprint事件里加入datasetcount.commandtext:='select count(金额) from 表 where No between LastNo and'+ intto str(dataset.RecNo); datasetcount.open; value:=inttostr(datasetcout.count); datasetcout.close;
在报表中打到哪里,源Dataset就移动那里。 所以可以充分利用beforprint作一些事情。
kylion(凯林) reporttail 是什么???
用beforeprint也可以实现啊: 在最后的合计QRlabel的beforeprint判断源dataset的记录是不是到末尾了: if dataset.recno=dataset.recordcount then value:=... else value:='';
用beforeprint也可以实现啊: 在最后的合计QRlabel的beforeprint判断源dataset的记录是不是到末尾了: if dataset.recno=dataset.recordcount then value:=... else value:='';
详细点~
提示:无论用adotable或adoquery你都可得到你所需要的count,然后就比较
datasetcount.open;
value:=inttostr(datasetcout.count);
datasetcout.close;
所以可以充分利用beforprint作一些事情。
在最后的合计QRlabel的beforeprint判断源dataset的记录是不是到末尾了:
if dataset.recno=dataset.recordcount then value:=...
else value:='';
在最后的合计QRlabel的beforeprint判断源dataset的记录是不是到末尾了:
if dataset.recno=dataset.recordcount then value:=...
else value:='';