Hi,
I will try to present the problem with example in order to minimize the description and make it as clear as possible.
What I am trying to do:
- Report generated from the data of two content types (Timesheet and Expense).
- The report should present the data aggregated (SUM) as per Site.

Problem 1.
"Fatal error: Cannot access empty property in ~/sites/all/modules/field/field.attach.inc on line 314"
More info can be found here: http://drupal.org/node/1321992 and here: http://drupal.org/node/1461536
Problem 2 (once Problem 1 has been "patched").
The aggregated view shows zero value for every single field.

If I remove one (any) of the content types from the view, the aggregation works perfectly OK.
To overcome Problem 2, I had to modify the content types to duplicate the differences in the columns (I made the duplicated fields hidden):

Could anyone shed some light Please?
Thanks,
Pimmy
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | viewsAggregation4.jpg | 4.63 KB | Pimmy |
| #1 | viewsAggregation3.jpg | 4.02 KB | Pimmy |
| viewsAggregation2.jpg | 57.39 KB | Pimmy | |
| viewsAggregation.png | 27.64 KB | Pimmy |
Comments
Comment #1
Pimmy commentedattaching screenshot of actual result.
Comment #1.0
Pimmy commentedattach additional screenshot
Comment #2
Pimmy commentedIt ended up that the workaround which I've mentioned above (duplicate the differences in the columns in order for the aggregation to work) is of no use due to the fact that the SUM aggregation takes place before the Math expression of the view. I've battled with this for the past few days and eventually gave up.
If someone knows how to control the order of execution of Views (in my case Math expression first, and only then Aggregation) I would be most greatfull. In my opinion this is a pure enhancement request.
Eventually I found another solution to my problem which is to use PHP Calculated field in the content type to provide the values which I was calculating via Math Expression. Unfortunately I hit another problem with Views Aggregation - If all of the fields for particula group has zero values, the entire column (including the other groups values) gets set to zero:
Please help me with this. I am really struggling here.
Thanks,
Pimmy
Comment #3
Pimmy commentedI've provided steps on how to replicate the problem here (#5): http://drupal.org/node/1451894#comment-5704194
Comment #3.0
Pimmy commentedtiny corrections
Comment #4
mustanggb commented