Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Error on creating custom report
 
Raul Sakai O2TI
Jr. Member
 
Avatar
Total Posts:  5
Joined:  2012-02-04
 

Hi guys i\\\’m having trouble with creating a new report on magento ce, i\\\’m getting the following error

Fatal error: Call to a member function getReportFull() on a non-object in /var/www/html/magento/sonoma/app/code/core/Mage/Reports/Model/Resource/Report/Collection.php on line 286

here follows my collection

<?php
class EcommSolutions_CustomReports_Model_Mysql4_Report_GroupedSalesSource_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract {
    
function __construct() {
        parent
::__construct();
    
}

    
protected function _joinFields($from \\\'\\\'$to \\\'\\\'{
        $this 
-> addAttributeToSelect(\\\'*\\\');
        return 
$this;
    
}

    
public function setDateRange($from$to{
        $this 
-> _reset() -> _joinFields($from$to);
        return 
$this;
    
}

    
public function load($from \\\'\\\'$to \\\'\\\'{
        $this 
-> getSelect() -> reset() -> from(array(\\\'usr\\\' => \\\'customer_entity_varchar\\\'), \\\'*\\\') -> joinLeft(array(\\\'attr\\\' => \\\'customer_entity_varchar\\\'), \\\'usr.entity_id = attr.entity_id\\\', array(\\\'register_source\\\' => \\\'attr.value\\\', )) -> joinLeft(array(\\\'sfo\\\' => \\\'sales_flat_order\\\'), \\\'usr.entity_id = sfo.customer_id\\\', array(\\\'value\\\' => \\\'sfo.base_grand_total\\\')) -> where(\\\'attr.attribute_id = 155 and sfo.status not like \\\"canceled\\\" and sfo.status not like \\\"pending\\\"\\\') -> group(\\\'attr.value\\\');
        return 
$this;
    
}
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top