Applies to version: 2020.1.x and above; author: Katarzyna Cypser
The WEBCON 2020 version introduces the functionality of coloring reports on the MODERN form.
In addition to the ability of coloring cells, you can also add icons, shade cells and create many advanced configurations using the conditional instructions.
The option is available in the report configuration:
When editing the report, a new “Style” column appears in the “Views” tab. By clicking the “Pencil” icon next to the selected column of the report, a window with the option of choosing one of four coloring modes is opened:
A. Data bar
In the Data bar coloring mode, the cells will be colored according to the percentage of data contained in them to the range between the minimum and maximum value.
In the configuration select the color from the available color palette and specify the minimum and maximum values.
Below is an example configuration for a column contains numbers between 1-11, with introduced min=1 and max=10 values.
The report view after configuration:
All values between the minimum and maximum range have a proportionally distributed bar of the selected color, values >=10 reach 100% of color, values =<1 reach 0% of color. After adding more elements to the report, the min/max values can change and with them the bar width for each cell.
B. Color scale
In the configuration of the Color scale mode, the cells will be colored according to the percentage of data contained in them to the range between the minimum and maximum value. Compared to the Data bar mode, here, the color saturation is changed. There are four types of colors to choose from and each of them has ten shades.
In the example below, for the column with numerical data in the range of 100-1000, the color type: Red-Transparent-Green was used in the configuration. It means that the color of the cells will change the shade gradually from red to green.
On the report below, you see that the numbers from the range of 0-100 are in red with maximum saturation, and from the range of 900-1000 are green, the rest values have a shade of color with a proportionally distributed shade.
C. Conditions
The Conditions mode using conditional instructions and the operators available depending on the data type of the selected column. In this mode you can change the color and fonts, and refer to the content of other columns (from the 2020.3 version).
In the example below, there is a column with several conditions referring to the value of the own column and from other columns.
The report view after configuration:
D. Advanced
In the Advanced mode, the configuration is possible by using the JSON format. The scheme of creating such a configuration can be found at: http://developer.webcon.com/json-schemas/v1/column-formatting.schema.json.
The Advanced mode allows to make more advanced settings in which you can manipulate inside of cells, add images etc.
In the configuration below you can add a text to the cell with its border.
The report view:
In another example, an expression with the ‘if’ function has been used, depending on the value in the cell, its color and background color will change and also the appropriate icons with different styles are added. The CurrentField and CurrentRawValue column names are used when referring to data from the cell and when referring to content from the other columns, the names from MSSQL (without “WFD_”) are used.
The report view:
If after saving the basic configuration you want to change the coloring mode to advanced, in the text field you can see the created JSON file and modify it according to your needs.