0
votes

I am trying to override the 'Mage_Adminhtml_Block_Report_Sales_Sales_Grid' block. My code in config.xml is as in below:

        <adminhtml>
            <rewrite><report_sales_sales>Tal_SalesOrderReports_Block_Adminhtml_Report_Sales_Sales_Grid</report_sales_sales></rewrite>
        </adminhtml>
    </blocks>

Then i am getting below error: Fatal error: Call to a member function hasData() on a non-object in C:\xampp\htdocs\abc\app\code\core\Mage\Adminhtml\Block\Report\Grid\Abstract.php on line 102

Can anyone please help me. Thank You

1

1 Answers

0
votes

Judging by your XML, you're trying to override Mage_Adminhtml_Block_Report_Sales_Sales, not Mage_Adminhtml_Block_Report_Sales_Sales_Grid. If you want to override the grid, then your XML should look like this:

    <adminhtml>
        <rewrite><report_sales_sales_grid>Tal_SalesOrderReports_Block_Adminhtml_Report_Sales_Sales_Grid</report_sales_sales_grid></rewrite>
    </adminhtml>