filter_less

 
           filter_less(string $table, string $column, mixed $param, bool $is_or_equal = false, $parameters_type = Constants::SRE_NUMBER)     {  
This filter should be used with a numeric or DateTime column to get the data that is less than a certain parameter value. Please note that you can combine multiple filters for the same report.
# This method is available in both the community edition and the commercial edition .

# Note

The column you are using for any of the filters methods must be a selected column in your report.

# Parameters

Parameter Description
$tableThe table which contains the filter by column.
$columnThe filter by column (The column by which you want to filter the report )
$paramThe filter parameter value. It can be a number or a date.
$is_or_equalA boolean with false as the default. Set this parameter to true if you want the filter to be "less or equal".
$parameter_typeThe data type of the filter parameter. It can be SRE_NUMBER or SRE_TEXT. If omitted, SRE_NUMBER will be used.

# 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", "date", "units_in_stock","product_name"))
       ->filter_like("items", "country", "usa")
       ->filter_less("items", "date", "2018-01-01",SRE_TEXT);
$engine = new CustomEngine($report);
$report_path = $engine->create_report();