After our recent upgrade to 1.4.1.0, we have found that we cannot run any sales reports. Reports for Products and Shopping Cart work fine, but each time we try to run sales reports, a message says “This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed.”
Even after refreshing lifetime statistics, the reports cannot be run. This error came up after refreshing statistics and trying to rerun the report:
Fatal error: Call to undefined method Mage_Reports_Model_Grouped_Collection::getIntervals() in /var/www/vhosts/comitstores.com/httpdocs/app/design/adminhtml/default/default/template/advancedreports/grid.phtml on line 159
The Advanced Reports extension was previously installed. After seeing this error, an attempt was made to disable the extension, but Magento Connect is not allowing it to be disabled.
Has anyone else experienced problems with Sales Reports since upgrading? Or have any ideas on what might be the problem?
having ths ame issue...I also tried a fresh install but the issue is still there, I am not even using advanced reports, allready a sloution found on this?
Having the same issue here. Not only can not run sales report, but no sales history shows. I suspect it has to do with the new table structure in 1.4.1.x since I can see sales_orders has rows, but not sales_flat_orders.
there are many orders and invoice in my backend, but when i click report-->sales-->order ,also after make the filter ,but no list show.
any one can offer the fix? thx andvanced!
I think i found the problem. For me it happened becasue I changed few things in app/Mage/Sales/etc/config.xml.
When i replaced it with the original file the problem was solved and I could see the Average Order and Lifetime Sales.
I had this problem. I changed the time zone to a very different one. Saved and was able to run the reports. I then switched back to EST and the reports ran this time.
Eh, nevermind. It appears it was a fluke and it’s now reporting has changed behaviour, in that it’s now throwing me either back to the Admin login page or even worse, back to the website homepage.
I had this problem. I changed the time zone to a very different one. Saved and was able to run the reports. I then switched back to EST and the reports ran this time.
Is there any fix for this? I have tried everything suggested in this post. Also my lifetime sales are 0 and I have lots of orders and payments? I am using 1.4.1 and dont get any sales reports and my lifetime sales is 0 ??? this is extremely frustrating right now. Any help much appreciated
After running into the same problem of 0 lifetime sales after upgrading from 1.3.0 to 1.4.2.0 I started Googling for the solution. Only thing I found were a lot of people with the same question and few answers. The original problem on this page was timezone related (and yes it fixed some of my problems,so thanks!) I still needed a fix for the lifetime sales being 0 and since some of you seem to have a similar problem I though it would be good to post here with my solution to it.
After fixing the timezone issue the Lifetime sales was still 0 and I went into the code and found that the SQL getting the numbers got quite the upgrade between versions. First of all it seems possible to use aggregated data to get the numbers, I haven’t got the numbers out through this route (enable it in config, sales, dashboard) so I went through the code and noticed the following in Mage_Reports_Model_Mysql4_Order_Collection on line 380:
$this->getSelect()->where('main_table.status NOT IN(?)', $statuses) ->where('main_table.state NOT IN(?)', array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT));
So here Magento does not count the amounts of orders with a cancelled ($statuses), new (pending) or pending payment status. And, for me, here lies the problem. In my case I only take new orders, the order processing happens somewhere else and I don’t change the status of the order after it has been created. Changing the code above into:
$this->getSelect()->where('main_table.status NOT IN(?)', $statuses); // ->where('main_table.state NOT IN(?)', array(Mage_Sales_Model_Order::STATE_NEW, Mage_Sales_Model_Order::STATE_PENDING_PAYMENT));
makes the totals re-appear again
As far as I can tell the code was upgraded after 1.4.0.1 (I have no installs between 1.4.0.1 and 1.4.2.0 laying around so I can’t check)
Yea that does bring back lifetime sales but yet have question about removing checks for \"main_table.state\" and using only checks for \"main_table.status\".