Eclipse Birt changes data row background color

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.