Birt报表添加隔行背景颜色

‍1.选中整表,在script的onprepare里写:

count = 0;(不能有 var)


2.选中表格数据明细行,在script的oncreate里写:

count++;
if( count % 2 == 0 )
{
    this.getStyle().backgroundColor="#ECF3FE";
}
else
{
    this.getStyle().backgroundColor="#FCFFFE";
}

你可能感兴趣的:(birt,隔行变色)