__construct
__construct
__construct(ReportOptions $report)
Parameter | Description |
---|---|
$report | An instance of 'ReportOptions' class. It's needed to pass all needed report options to the 'CustomEngine' class which is responsible for building the report. |
try{
$report = new ReportOptions(SRE_PUBLIC_REPORT);
$report->select_tables(array("items"))
->set_grouping(array("country"))
->select_all_fields();
$engine = new CustomEngine($report);
$report_path = $engine->create_report();
echo "Your report URL:" . $report_path;
} catch (Exception $ex) {
echo 'Caught exception message: '. $ex->getMessage();
}