conditional_format_less

 
          conditional_format_less(string $column, string $parameter, bool $is_or_equal , string $color)  
This method changes the background color of any cells in a given column to any color you like if the values of these cells are less than a given parameter.
# This method is exclusive to the commercial edition and is not supported in the community edition .

# Parameters

Parameter Description
$columnThe column on which you want to apply this conditional formatting method.
$parametera parameter that you want to use as a reference to compare each cell data in the selected column against.
$is_or_equalIf this parameter is set to true, the comparison criteria will be "less than or equal" instead of "less than".
$colorThis color will be used to highlight the cells that meet the conditional formatting criteria.

# Returns

This method returns the calling object, so it can be chained with other methods in the ‘ReportOptions’ class

# Code Example

 
           $report = new ReportOptions(SRE_PUBLIC_REPORT);
$report->select_tables(array("items"))
       ->select_fields(array("id", "country", "list_price", "units_in_stock","product_name"))
       ->set_grouping(array("country"))
       ->conditional_format_less("units_in_stock", 10, true)
       ->conditional_format_between("list_price", 0, 100,"#014421")
       ->set_layout("AlignedLeft")
       ->set_style_name("grey");  
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
            

# Related Post