Q1:
报表参数可以输入多个发票号,每个发票可以查到多条详细ITEM记录.
现在问题是一页最多打印5条ITEM记录
比如输入2个发票号,第一个发票查到14条ITEM记录,第二个发票查到6条ITEM记录,则报表一共是5页,
希望页码分别是: 1/3 , 2/3 , 3/3 , 1/2, 2/2
1/3 --第一个发票的前5条记录
2/3 --第一个发票的中间5条记录
3/3 --第一个发票的最后4条记录
1/2 --第二个发票的前5条记录
2/2 --第二个发票的最后一条记录
我在ITEM的循环集内已设置了最大循环数是5,所以数据显示没有问题,
关键就是这页码不知道如何能够实现.
不过今天在用report builder工具写oracle报表的时,客户需要根据不同的公司来获得页码,比如有三个公司,A公司有两页,B公司有三页,C公司有四页。通常是按1/9,2/9,3/9.....9/9来分的。然而客户需要这样来分:A公司1/2,2/2,B公司1/3,2/3,3/3,C公司1/4,2/4,3/4,4/4。自己想了一段时间,不知道怎么做,上网查了一下。原来在oracle报表中,是可以根据层级来设置页码的,一般默认的是最外层,要想实现客户的要求,只要在如下图中选择R框,它就会根据R框选择页码。 |
Q2:
我是需要统计分别统计每张发票的页数,比如说我一次打印三张发票,第一张只有1页,第二张2页,第三张2页,则每张上的显示是 1/1,1/2,2/2,1/2,2/2。而不是显示1/5,2/5,3/5,4/5,5/5。
1> Create two invisible fields outside the main page body: F_PN and F_TP
2> F_PN stands for Page Number; F_TP for Total Number; and F for Field
3> Refereed F_PN to Physical Page Number from the Source property
4> Refereed F_TP to Total Physical Page Number from the Source property
5> Assigned the Repeating frame that count the发票 block to both two fields' Page Numbering property.
6> Using the syntax that Armok mentioned but referred to the two fields you just created. For instance, 第 &<F_PN> 页 (共 &<F_TP> 页)
Give it a shot and good luck.