The Webform Report module provides a neat interface for us to define custom report layouts based on submitted Webform data. The reports are sortable, searchable, downloadable, and highly configurable. Webform Report creates a new content type for our Drupal website and provides a set of user permissions similar to most content types (for example, access, editing, and so on).
Let's navigate to the Webform Report homepage at http://drupal.org/project/webform_report and download the latest 7.x version. The compressed folder needs to be extracted in sites/all/modules
so that we have sites/all/modules/webform_report
.
Now we navigate to our site's Modules page to enable the module by checking the box next to its name and clicking on Save configuration.
Let us build a report that will list the speaker presentations currently approved for our Fictitious Conference.
Accepted
status.Webform Report is, essentially, a query builder that helps us to pull information out of the submissions made on a Webform.
Our first step is to specify the fields we would like to see in the report and the sequence in which they should appear. Several operations become available to us when we have added fields in the Report Columns fieldset. We may move fields up or down, move them to the top or bottom of the list, or trash them if we find that we selected an unnecessary field. Any fields we may require for filtering or sorting purposes, but do not wish to have included in the display, may be marked as Hidden.
The Filters fieldset is where we specify conditional criteria that define whether to include (or exclude) submissions based on submitted data values. While specifying our filters we must heed the warning that All filters are ANDed together to avoid unexpected results. Data from a particular submission will only be included if all of the specified filter criteria are satisfied.
Although the reports are sortable by clicking on the field headings, we may specify an initial sequence for the data by adding fields in the Sort By fieldset. Once fields have been selected we may indicate whether we wish for the field to be sorted in ascending or descending sequence.
We have discussed the query building nature of Webform Report, but that is not all there is in this module.
While adding columns to the report, we notice that we are also able to include various submission metadata fields and links to View, Edit, or Delete the listed submissions.
The Options fieldset on the Report Criteria page offers several ways to customize the display of our report. We will normally want to keep the Results per page set at 20 (the default minimum) to prevent server overload if this report is expected to attract a lot of browsing traffic.
As we saw when we viewed our report, visitors to this page will have the opportunity to Download as CSV. Checking the box at Hide CSV Download option removes the download link from the report display.
Checking the Display Search Form option will enable users to search the submission database for specific values in a selected field. The Report Layout options are Report (renders as an HTML table, one submission per row) or Submission (an HTML table resembling the standard Webform submission View).
An important step to remember is to correctly set permissions for the various roles that need to have access to the reports we create. To assign these permissions we navigate to People in our menu toolbar and click on the PERMISSIONS tab. We will find the Webform Report permissions below Webform in the list.