Description: Determines the background color of a statistics result cell.
Execution: The formula can run for normal, aggregated and CustomStatistic placeholder cells.
Arguments:
Argument_CurrentColumn: normalized output column index; it can be -1 for aggregated rows or super results.
Argument_CurrentRow: normalized output row index; it can be -1 for aggregated columns or super results.
Argument_CurrentValue: raw or placeholder value of the cell being colored.
Argument_CurrentColor: default background color before the formula runs, as a TColor value.
Argument_CurrentItemName: output statistic name, such as Min, Max, Avg, Count or CustomStatistic; it is not the StatItem name.
Result: Required. Result is converted to Integer/TColor and used as the cell background color. NULL produces white; if the formula fails, the original color remains.
Availability: Statistics item formula. For custom aggregated cells, Argument_CurrentItemName can currently contain CustomStatistic, CustomStatistics or CustomCalc depending on the execution branch.
Example:
Result := Argument_CurrentColor;
if Argument_CurrentValue < 0 then
Result := 255; // red TColor value