Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to add a coulumn that displays the sum of all the select keys chosen in a report?
Comment | File | Size | Author |
---|---|---|---|
#5 | webform_report.install.patch | 1.26 KB | diaxpro |
#5 | webform_report.module.patch | 4.04 KB | diaxpro |
#5 | webform_report_criteria.inc_.patch | 12.7 KB | diaxpro |
#5 | webform_report.inc_.patch | 27.37 KB | diaxpro |
#3 | webform_report.inc_.patch | 28.44 KB | diaxpro |
Comments
Comment #1
diaxpro CreditAttribution: diaxpro commentedHi, I'm working on something like that, so far I have managed to show totals for the grid type, the next thing I do is to select, to have a while to upload a patch.
Comment #2
diaxpro CreditAttribution: diaxpro commentedLet me explain exactly does this patch, if the creator wishes to integrate to module would be happy to participate in any shortcomings.
This patch adds two new columns to the table webform_report, statistics and roles.
If you already have installed webform_report, update module will be added by these two new fields to the table and if you have not installed it yet installed them.
When we apply the patch in the creation of webform report we see that now we have new statistics section where we can add fields in the webform, but only the grid , select and textfield types.
Once you add the field in the column can select between viewing display submissions (if not select any box submissions will be by default) and percentages (these options are only for grid and select) and options in the field we can add total, this total is the number of submissions * field key, and another is to show the average.
In the grid fields and select can also select which items or questions depends on the type we want to show. The default add them all.
In all these fields we add the filters are applied to select. Be prepared so that they can combine different filters affect the statistics correctly. If we add 3 filters the results have to be 3.
Was added to the final, the selection of roles we want to see the statistics.
And also supports export independent of the statistics and the columns.
I welcome your opinions and recommendations. A greeting.
Comment #3
diaxpro CreditAttribution: diaxpro commentedSorry but in file webform_report.inc_.patch in line 26
if( _webform_report_get_role_access($row->nid) || user_access('access webform reports') || $row->uid ==$user->uid)
change for
if( user_access('access webform reports') || $row->uid ==$user->uid)
this function
_webform_report_get_role_access($row->nid)
is for other patch to module webform, control access to results by rolesAnd in webform_report_criteria.inc.patch in line 29
Sorry.
Comment #4
jimbullington CreditAttribution: jimbullington commentedThank you for the patches!
Can you please remove the role restrictions from this patch and post another set of patches? It does not seem to apply to this issue - I think it belongs under a separate issue if you want to pursue it.
Comment #5
diaxpro CreditAttribution: diaxpro commentedI re-created the patch deleting everything related to the restriction of roles. I could not prove it, if there are any problems please comment. I hope to be useful.
Regards.
Comment #6
DrewMathers CreditAttribution: DrewMathers commentedI got
Putting in the missing comma on 295 fixes the problem.
If you apply any filter (even one that displays all records) all statistics go to 0.
The Total label displays "Total Ponderate".
When the patches are applied, all items on the report are displayed in a single column.
Comment #7
Tesira CreditAttribution: Tesira commentedIs the statistic section lost in the 7.x Version of the modul?
I search for a possibility to get the sum of a culomn.
Comment #8
divan009 CreditAttribution: divan009 commentedI am also looking for this for 7.x