title: Magento Admin Custom Sales Report
body: <p>I have to develop a module to export collection of product,order,customer combined attributes. So i thought rather than modifying the core sales report for this purpose better to do a custom functionality. These are the steps that i did but i am not able to produce it. Used magento 1.4.1 version for this.</p>
  
  <p><strong>Under</strong>
  /var/www/magento141/app/code/core/Mage/Reports/etc/adminhtml.xml
  Added these lines for menus.</p>
  
  <pre><code>           &lt;ereaders translate="title" module="reports"&gt;
                  &lt;title&gt;Sales Report&lt;/title&gt;                  
                   &lt;children&gt;
              &lt;ereaders translate="title" module="reports"&gt;
                          &lt;title&gt;Sales Report&lt;/title&gt;
                          &lt;action&gt;adminhtml/report_sales/ereaders&lt;/action&gt;
                      &lt;/ereaders&gt;
                  &lt;/children&gt;                                    
              &lt;/ereaders&gt;
  </code></pre>
  
  <p><strong>Under</strong></p>
  
  <p>/var/www/magento141/app/design/adminhtml/default/default/layout/sales.xml
  Added these lines for filter condition.</p>
  
  <pre><code>&lt;adminhtml_report_sales_ereaders&gt;
      &lt;update handle="report_sales"/&gt;
      &lt;reference name="content"&gt;
          &lt;block type="adminhtml/report_sales_sales" template="report/grid/container.phtml" name="sales.report.grid.container"&gt;
              &lt;block type="adminhtml/store_switcher" template="report/store/switcher/enhanced.phtml" name="store.switcher"&gt;
                  &lt;action method="setStoreVarName"&gt;&lt;var_name&gt;store_ids&lt;/var_name&gt;&lt;/action&gt;
              &lt;/block&gt;
              &lt;block type="sales/adminhtml_report_filter_form_order" name="grid.filter.form"&gt;
                 ----
              &lt;/block&gt;
          &lt;/block&gt;
      &lt;/reference&gt;
  &lt;/adminhtml_report_sales_ereaders&gt;
  </code></pre>
  
  <p>And then copied the needed block,model files from sales and renamed all of them into  ereaders under /var/www/magento141/app/code/core/Mage/Adminhtml/. </p>
  
  <p>Then placed action for ereaders under /var/www/magento141/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php </p>
  
  <pre><code>public function ereadersAction()
  {
  $this-&gt;_title($this-&gt;__('Reports'))-&gt;_title($this-&gt;__('Sales'))-&gt;_title($this-&gt;__('EReaders Sales'));
  
      $this-&gt;_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE, 'ereaders');
  
      $this-&gt;_initAction()
          -&gt;_setActiveMenu('report/sales/ereaders')
          -&gt;_addBreadcrumb(Mage::helper('adminhtml')-&gt;__('EReaders Sales Report'), Mage::helper('adminhtml')-&gt;__('EReaders Sales Report'));
  
      $gridBlock = $this-&gt;getLayout()-&gt;getBlock('report_sales_ereaders.grid');
      $filterFormBlock = $this-&gt;getLayout()-&gt;getBlock('grid.filter.form');
  
      $this-&gt;_initReportAction(array(
          $gridBlock,
          $filterFormBlock
      ));
      $this-&gt;renderLayout();
  }
  </code></pre>
  
  <p>Here when i use var_dump ==> //var_dump($this->getLayout()->getBlock('report_sales_ereaders.grid')); am getting bool(false) only. It does not call the ereaders grid, instead of its still loading blocks and grids from Sales only.</p>
  
  <p>I searched most of the files related to report, am not still able to find out the problem. 
  Hope many of you gone through these sort of issues, please can anyone tell me where am making mistake or missing something.  </p>