Highlight when adjacent cells have the same value

  • Last update:  2022-01-06
  • I. Overview

    1. Expected effect

    For the data in the data column, a column of data is displayed in a list. If the adjacent cell data is the same as the error data, you need to highlight the background of the cell with the same data. The effect is as shown in the following figure:

    1.png


    2. Implementation ideas

    Use the level coordinate formula in the condition attribute to get the previous value and the next value of the current cell. If the current value is equal to the previous value or the next value, the background of the current value is red.

    II. Example

    1. Prepare data

    Create a new general report, create a new embedded data set, and design the table as shown in the figure below:

    2.png


    2. Design table

    Drag the data columns into the cells respectively, and the table style is as shown in the figure below:

    3.png

    And A1 cell should be set to List, as shown in the figure below:

    5.png


    3. Add conditional attributes

    Select cell A1, add conditional formatting, select Background from the drop-down attribute, click Edit to customize the color, and set it toCurrent Cell. Select Common as the condition type, and add two conditions, which are equal to formula A1[A1:+1]and equal to formula A1[A1:-1]. Connect the two conditions with 'or'.

    Formula description:

    A1[A1:+1]: means to get the value of the cell above the current cell.

    A1[A1:-1]: means to get the value of the cell below the current cell.

    Note: The example shows that the data expanded vertically means that the upper and lower cells are the same. If the data is expanded horizontally and the left and right cells are the same, the highlighting can refer to Relative and Absolute Coordinates.

    The steps are shown in the figure below:

    4.png


    4. Effect preview

    1) PC terminal

    Save the report, click Pagination Preview, the effect is shown in Section I.1 .

    2) Mobile terminal

    Both App and HTML5 are supported, and the effect is shown in the figure below:

    6.png

    III. Template download

    Please refer to the completed template:

    %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportApplication\FeaturesApplication\Highlight when adjacent cells have the same value.cpt

    Click to download the template:  Highlight when adjacent cells have the same value.cpt

    Attachment List


    Theme: Report Features
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy