select_tables

 
          select_tables(array $selected_tables)  
Smart Report Engine supports two report data sources, which are:
1- Table-based data source (the default data source ): The report is based on one or more MYSQL tables.
2- SQL-based data source: The report is based on a SQL query. You should use this data source if you want to convert some queries to reports.
Usually, the report data source is defined when calling the 'ReportOptions' class constructor. So, If you are creating a table-based report, you need to call this method to define the table(s) you want to use for your report. You can select one or more tables.
# This method is available in both the community edition and the commercial edition .

# Note

You shouldn't call this method if you are creating a SQL-based report.

# Parameters

Parameter Description
$selected_tablesAn array of the table(s) that you want to use as a data source for your report.

# 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_all_fields();
$engine = new CustomEngine($report);
$report_path = $engine->create_report();