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.
Desired Aggregation

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.
Actual result

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):
Workaround to failed aggregation

Could anyone shed some light Please?

Thanks,

Pimmy

Comments

Pimmy’s picture

StatusFileSize
new4.02 KB

attaching screenshot of actual result.

Pimmy’s picture

Issue summary: View changes

attach additional screenshot

Pimmy’s picture

StatusFileSize
new4.63 KB

It 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:

Entire column gets zerroed

Please help me with this. I am really struggling here.

Thanks,

Pimmy

Pimmy’s picture

I've provided steps on how to replicate the problem here (#5): http://drupal.org/node/1451894#comment-5704194

Pimmy’s picture

Issue summary: View changes

tiny corrections

mustanggb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)