Determine the color of the RS report based on the variable comparison size

Source: Internet
Author: User
According to the work needs, we need to implement this function. For the current value of each prefecture-State Electricity Bureau, we first obtain the average value of a province, and then compare the value of each prefecture-State Electricity Bureau with the average value. If the average value is greater than the average value, the background color of the field is set to red.
The procedure is as follows:
1. Create a list in the RS report and create two fields, unit and current value.

2. Click the current value and create an average function, so that an average value is automatically displayed below.

3. On the query page, create a data item,
This data item is used to calculate the average value. The specific function uses average ([current value] for report). Note that we must add for report here, which is to fix the calculated average value.
Download(121.66 KB)

4. Drag the data item to the right of the report

5. Create a Boolean variable with the current value> data item 1, that is, the average value.

6. Return to the variable page and click
Then, in the style variable on the left, input the Boolean value 1,

7. Click the current value and set the background color to red.

8. Click the column on the right to select the title of data item 1, data item 1, and the Space box below. Then, in the data box variable in the box, select none

9.

10. Click execute. OK. The result is displayed. The current value is greater than the average value. The color turns red ..

This experiment focuses on the for report. If it is not added, the values displayed in data item 1 will be different for each row. for REPORT option

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.