Eclipse Birt changes data row background color
For the data area in the report, want to implement every other line, use the color of the impassability, how to achieve it, as follows:
1, the mouse is parked on the table, select row Detail row;
2, select the Script tab page, open the Birt Scripts edit window;
3. Select Onprepare from the dropdown list and add the JavaScript script below:
var count = 0;
4. Select OnCreate from the dropdown list and add the JavaScript script below:
count++;
if (count% 2 = 0) {
This.getstyle () BackgroundColor = "#EFEFEF";
}else{
This.getstyle () BackgroundColor = "#d4d0c8";
}
5, save, use the Web reviewer for preview, the data can be displayed in pagination. Be careful not to use the Preview tab page for browsing, this tab page browsing effect is not pagination. Published to the Web project, you can also do pagination display.