效果如下图:
没有进行多余的配色了,比较丑。呵呵。
现在看看怎么实现的。
怎么建报表,数据集,交叉表什么的,我就不说了。直接看一下建好的交叉表。
在行ORDERNUMBER的脚本prepare方法里写上:
a=0;
在oncreate方法里写上:
a++;
reportContext.setGlobalVariable("count",a);
然后转到明细数据(度量数据),在ORDERLINENUMBER的脚本prepare里写上:
i=0;
rowcount=1;
在oncreate方法里写上:
i++;
count = reportContext.getGlobalVariable("count");
count = parseInt(count);
if(rowcount%2 ==0){
this.getStyle().backgroundColor="#C4C4C4";
}else{
this.getStyle().backgroundColor="";
}
if(i%count==0){
rowcount++;
}
[img][/img]
没有进行多余的配色了,比较丑。呵呵。
现在看看怎么实现的。
怎么建报表,数据集,交叉表什么的,我就不说了。直接看一下建好的交叉表。
在行ORDERNUMBER的脚本prepare方法里写上:
a=0;
在oncreate方法里写上:
a++;
reportContext.setGlobalVariable("count",a);
然后转到明细数据(度量数据),在ORDERLINENUMBER的脚本prepare里写上:
i=0;
rowcount=1;
在oncreate方法里写上:
i++;
count = reportContext.getGlobalVariable("count");
count = parseInt(count);
if(rowcount%2 ==0){
this.getStyle().backgroundColor="#C4C4C4";
}else{
this.getStyle().backgroundColor="";
}
if(i%count==0){
rowcount++;
}
[img][/img]