select_fields

 
          select_fields(array $selected_fields)  
This method should be used if you want to show only some columns of the selected table(s) in your report. Therefore, you should either call this method or the “select_all_fields” method (which shows all columns). But, If both methods are called for generating the same report, the latter method will override the former.
# This method is available in both the community edition and the commercial edition .

# Parameters

Parameter Description
$selected_fieldsAn array of the MYSQL fields which you want to show in your report. These fields should exist in the selected MYSQL table(s)

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