转载水晶报表分页技巧
最近在修改学校的程序的发现个很大的问题,水晶报表运行总计字段的统计功能是针对整份报表的,而一般单页页脚的统计是针对当前页的。翻了半天business objects的文档,没有找到,后来google了半天,总算找到了解决方法。使用公式编辑器的自定义字段公式,主要使用whileprintingrecords;这个命令,这是当页面写入时调用此命令下的程序。


formula_1
whileprintingrecords;
global numbervar BFtotal;
global numbervar RStotal;
global numbervar BTtotal;
BFtotal:=0;
RStotal:=0;
BTtotal:=0;
formula_2
whileprintingrecords;
global numbervar BFtotal;
global numbervar RStotal;
global numbervar BTtotal;
BFtotal:=BFtotal+{VIEW1.保费};
RStotal:=RStotal+1;
BTtotal:=BTtotal+{VIEW1.补贴};
本页保费
whileprintingrecords;
global numbervar BFtotal;

本页补贴
whileprintingrecords;
global numbervar BTtotal;

本页人数
whileprintingrecords;
global numbervar RStotal;
浙公网安备 33010602011771号