1

I built a custom report pretty much following this guide http://www.summasolutions.net/blogposts/custom-reports-magento. However I also want the ability to add a filter; like the one located @ Report->Sales->Orders.

I have tried to figure out where all the necessary pieces located within core are but i must be missing something. They appear to be at Mage/Sales/Block/Adminhtml/Report/Filter/Form

Any help would be awesome

user398314
  • 367
  • 4
  • 12

1 Answers1

1

Have a look at /app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php, and go to salesAction, you'll see two blocks referenced:

$gridBlock = $this->getLayout()->getBlock('report_sales_sales.grid');
$filterFormBlock = $this->getLayout()->getBlock('grid.filter.form');

Which you can find defined in app/design/adminhtml/default/default/layout/sales.xml, under the section marked <adminhtml_report_sales_sale>. Note there are some options set here through action methods. This directs you to sales/adminhtml_report_filter_form_order, which you can find at app/code/core/Mage/Sales/Block/Adminhtml/Report/Filter/Form/Order.php, and its parent, ../Form.php. Have a look at the _prepareForm() functions, that should give you a better template to work with. Note that both of these are descendants of Mage/Sales/Block/Adminhtml/Report/Filter/Form.

ontek
  • 574
  • 6
  • 12