需求:
用水晶报表打印订单,需要在每次打印订单的时候,在订单的最后加上三页的法律条文。
而这三页是不需要pageHeader和pagefooter的
网上搜了一下,找到一种解决方案:
1、对PageHeader或者PageFooter里边的每一个Object选择Supress ->OnLastRecord
2、对PageHeader或者PageFooter在SectionExpert里边选择:Supress Blank Section
不足:
报表一般都是加表格线的,但是表格线有些object 不能被阻止

第二种解决方案,目前只能对Page Footer使用,Page Header 并不适用

1、新建一个formula 字段reset,加入PageHeader中:
numberVar pageRecordCount;
WhilePrintingRecords;
pageRecordCount :=0;

2、新建一个formula字段calculate,在Details中加入:
numberVar pageRecordCount;
WhilePrintingRecords;
pageRecordCount := pageRecordCount +1;

3、新建一个Formula字段:PageRecordCount,返回PageRecordCount:
PageRecordCount;

4、在Footer的Suppress中填入:{@PageRecordCount}<0

第三种方案:PageHeader可用
1、新建一个Formula 字段 IsLastRecord:
EvaluateAfter({@calculate});
OnLastRecord;

2、在PageHader的Suppress中填入:{@IsLastRecord:}


其它的办法还在探索中...
后来有测试,第一种在简单的测试的时候是可行的,但是在项目中测试没通过,明天继续测试...

posted on 2009-08-11 17:53  沉默的心  阅读(871)  评论(0编辑  收藏  举报