I'm looking to generate the New vs Existing report in the code and use it for some other processing. I can see that Am_Reports exists, but I'm not sure how to get the report I need. I'm looking to do something like this: PHP: $report = new Am_Report_NewVsExisting();$report->setInterval($start, $stop);$report->setQuantity(new Am_Quantity_Day());$result = $report->generate(); Any help is appreciated.
We have some reports that we want on the dashboard and some we want sent to our email every so often at different intervals. Right now aMember Pro only allows us to send all reports at the same time over email, so I was going to write a small plugin to support the per-report settings.
Here is example of code to run report: PHP: class_exists('Am_Report', true);require_once 'Am/Report/Standard.php';$r = Am_Report_Abstract::createById('newVsExisting');$r->applyConfigForm(new Am_Mvc_Request(array( 'period' => Am_Interval::PERIOD_THIS_WEEK_FROM_SUN, 'quant' => 'day')));$result = $r->getReport();foreach ($r->getOutput($result) as $output) { echo $output->render();}