dynamic_filter_equal

 
          dynamic_filter_equal($table, $column)  
This is one of the dynamic filters supported in the Smart Report Engine to filter your report by parameters entered by your end users. In other words, your end users can change the output of generated reports based on the parameter values they enter before previewing the reports. For example, using this type of filter you can easily create a sales per region report where each end user can select the region they want to see. And, you can combine many filters in the same report.
This method filters any specific column by a parameter entered by your end user. So all you need to specify is just the column you want to filter and the table containing it.
# This method is exclusive to the commercial edition and is not supported in the community edition .

# Parameters

Parameter Description
$tableThe table to be filtered.
$columnThe filter-by column (The column by which you want to filter the report).

# Returns

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

# Code Example

 
           use SRE\Engine\CustomEngine;
use SRE\Engine\ReportOptions;
require_once "sre_bootstrap.php"; //Make sure use the correct relative path to this file.
$report = new ReportOptions(SRE_PUBLIC_REPORT);
$report->select_tables(array("items"))
        ->select_all_fields()
        ->set_grouping("country")
        ->dynamic_filter_equal("items","region");
          
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
if ($report_path) {
    echo "Report created successfully! Your report URL: $report_path  ";
}