Hi. +1 for the documentation issue, it took me HOURS to figure out basic things like that views calc was a View Type and that this was how to add the column sums, etc. Some posts I saw seemed to indicate choosing views in settings/views_calc and others indicated that I should see a columns tab in these settings. ARGH. Let me know if I can contribute some documentation here but I won't be able to do a great job because I'm just too slammed.
Anyway I did discover a bug after figuring out how to configure a view calc. I confirmed that the SUM column works fine as long as I have only one field that I'm adding together (one column). But if I add another, then a SQL error pops up and the calculation breaks. I can make one OR the other field in my case sum, but I can not have them both sum. Both are integer fields.
Thanks for a great module. Really does need documentation or a link to a tutorial or something.
Comments
Comment #1
junro commentedHello,
could you explain how the module works in this page please ^^ http://drupal.org/node/253228
Thanks ^^
Comment #2
likewhoa commentedI can confirm this bug in drupal-6.6 and views-6.x-1.0-rc and 6.x-1.x-dev also. The way I see it is that you're gonna get a SQL query error when selecting multiple column calculations i.e SUM of fields but if you select just one column calculation is works, it also will show the calculation of the first field whe the SQL query error appears when you select distint calculations for two fields. for instance I selected two fields in views_calc, one had a SUM calculation while the other a COUNT calculation, the first calculation of SUM shows but page still contains SQL error because I select multiple columns, but If I go back and change the field which COUNT calculation to SUM then none of the calculations will show and the SQL error remains. This is clearly a bug and it's pointing to view.inc line 723 in view's module which that line is for the query which views_calc got wrong. I hope this clears things up and I'll be glad to make documentation on views_calc usage on both drupal5 and 6
Comment #3
karens commentedSomething in Views changed after I first got this module working (and yes it did work at one time). The bug is coming from the new Views optimization where it removes tables that are used more than once. In this case I still need those tables, so I have to find a work-around. There are numerous duplicate reports of this same problem so I'm going to keep #358459: User warning: Unknown Table 'node_data_field open and close the others.