Form.io Reporting Module
The Form.io Reporting Module lets you design and generate reports from form submission data. You can pull data from one or multiple forms within a project, perform calculations, and present the result
Overview
How It Works
The Reporting Module uses MongoDB's Aggregation Pipeline, a framework for transforming and combining data from multiple sources. This allows you to:
Join data from multiple forms
Perform calculations on field values
Group and summarize data
Filter and sort results
You don't need MongoDB expertise to use basic reporting features. However, understanding aggregation concepts helps when creating advanced reports.
Learn More: See MongoDB Aggregation Pipeline for detailed information.
Prerequisites
A Form.io Library License with Reporting Module enabled is required to use the @formio/reporting module . Contact [email protected] to acquire or upgrade your license.
Technical Requirements
formio-enterprise v8.4.1 or greater
Access Requirements
Your users need these permissions to view reports:
Project Level
Read All: Authenticated
Reporting UI Resource
Read All Submission: Authenticated
Source Forms
Read All Submission: Authenticated
Getting Started
This section walks you through creating and embedding your first report.
Step 1: Enable Reports in Your Project
Once the Reporting Module is enabled on your license, a Reports section appears in your project's navigation sidebar.
Note for Existing Projects: Projects created before Reporting Module activation may lack the Reporting UI resource. See Troubleshooting to resolve this.
Step 2: Create Your First Report
Navigate to your project in the Form.io portal
Click Reports in the left sidebar
Click New Report
Enter a Report Title
Click the Source Forms tab
Select one or more forms from the dropdown
Click the Columns tab
Select the columns you want to display
Click Submit Form to save
Your report now appears in the Reports list. Click Preview to see the report structure.
Note: The portal preview doesn't fetch live data. To see actual submission data, embed the report in an application.
Step 3: Embed the Report
Install the reporting module in your application:
Or with yarn:
Add the report to your application:
Expected Result: The report grid displays in your #report-container element with your form's submission data.
Report Structure
An embedded report consists of two main components:
Reporting Grid
The main data display area. It provides:
Pagination - Navigate through large data sets
Sorting - Click column headers to sort ascending/descending
Row Selection - Select rows for bulk actions
Column Filtering - Filter data within specific columns (when Controls are disabled)
Column Visibility - Show/hide columns from the grid header menu
Reporting Controls (Optional)
A collapsible panel above the grid for data management:
Filters - Apply custom filters to the data
Column Visibility - Toggle which columns display
Actions - Execute operations on selected rows (export, custom actions)
You can enable or disable the Controls panel in the report settings.
Guides
Prerequisites
To follow along with the guides, import the example Forms into a project using the following embed URLs.
Import the Department Resource using the embed URL below into your project https://documentation.form.io/department
Import the Salary Resource using the embed URL below into your project https://documentation.form.io/salary
Edit the Department select component and navigate to the Data tab.
Click the Resource dropdown and select the Department Resource.
Click the Value Property field and select Department
Import the Employee form into your project https://documentation.form.io/employee
Edit the Department select component and navigate to the Data tab.
Click the Resource dropdown and select the Department Resource.
Click the Value Property field and select Department
Import the Employee Evaluation form into your Project https://documentation.form.io/employeeevaluation
Edit the Department select component and navigate to the Data tab.
Click the Resource dropdown and select the Department Resource.
Click the Value Property field and select Department
Create a Single-Form Report
Use this approach when reporting on data from one form.
Scenario: Create an Employee Overview report showing employee names, departments, and start dates.
Go to Reports > New Report
Set Report Title to "Employee Overview"
Click Source Forms tab
Select Employee from the dropdown
Click Columns tab
Select columns: Employee ID, First Name, Last Name, Department, Start Date
Click Submit Form
Result: A report displaying all Employee submissions with the selected columns.
Create Calculated Columns
Use calculated columns to derive new values from existing fields.
Scenario: Combine First Name and Last Name into a single "Full Name" column.
Open your report for editing
Click the Calculated Columns tab
Click + Add Column
Set Column Title to "Full Name"
Set Column Key to "fullName"
Select Concatenate Strings from the Operator dropdown
In Arguments, click + Add Another and select:
First argument: First Name
Second argument: (space character or add another field)
Third argument: Last Name
Click Save
Go to Columns tab and add "Full Name" to your selected columns
Click Submit Form
Available Operators:
Array Size
Count items in an array
Count languages spoken
Concatenate Strings
Join text values
Combine first + last name
Date Difference
Calculate time between dates
Employee tenure
Day of Month/Week/Year
Extract date parts
Group by day
Month Number
Extract month (1-12)
Monthly reports
Week Number
Extract week (0-53)
Weekly reports
Year
Extract year
Annual reports
Divide
Divide two numbers
Calculate ratios
Multiply
Multiply numbers
Calculate totals
Summarize (Sum)
Add numbers together
Sum values
Reference: See MongoDB documentation for each operator: Aggregation Operators
Join Multiple Forms
Use this approach when you need data from multiple related forms.
Scenario: Create a report joining Employee data with Salary data, where both forms share a Department field.
Prerequisites:
Two or more forms with at least one common field
The common field must contain matching values (e.g., same Department IDs)
Steps:
Go to Reports > New Report
Set Report Title to "Employee Salary Report"
Click Source Forms tab
Select Employee from the dropdown
Select Salary from the dropdown (you now have 2 forms selected)
In Forms Connections, click + Add Connection
Configure the connection:
Base Form: Employee
Connecting Field of Base Form: Department
Joining Form: Salary
Connecting Field of Joining Form: Department
Click Save on the connection
Go to Columns tab—you now see fields from both forms
Select your desired columns
Click Submit Form
Path to Connecting Value:
If your field stores an object (e.g., the entire Department submission), specify the path to the ID:
Base Form Path:
_idordata.departmentIdJoining Form Path:
_idordata.departmentId
Create Aggregated Reports
Use aggregation to group data and calculate summaries.
Scenario: Show total employees and average salary per department.
Create a multi-form report with Employee and Salary forms (see above)
Click the Aggregation tab
In Fields to group by, select Department Name
In Group Calculated Columns, click + Add Column
Add first aggregation:
Column Title: Total Employees
Column Key: totalEmployees
Operator: Count
Click + Add Column again
Add second aggregation:
Column Title: Average Salary
Column Key: avgSalary
Operator: Average
Argument: Salary Amount
Decimal Places: 2
Go to Columns tab and select: Department Name, Total Employees, Average Salary
Click Submit Form
Available Aggregation Operators:
Average
Mean value of numeric field
Count
Number of records in group
Max
Highest value in group
Min
Lowest value in group
Sum
Total of numeric values
Configure Filters
Allow report viewers to filter data interactively.
Prerequisites: Reporting Controls must be enabled.
Click the Reporting Controls tab
Check Enable Control Panel
Click the Filters tab
Set Number of Filters Per Row (e.g., 3)
Set Filter Label Position (Top, Left, or Right)
In Control Panel Filters, click + Add Filter
Configure the filter:
Field: Select the field to filter (e.g., Department)
Filter Type: Select operator (Contains, Equals, Greater Than, etc.)
Filter Title: Label shown to users (optional)
Add additional filters as needed
Click Submit Form
Filter Types by Field Type:
Text
Contains, Equals, Starts With, Ends With, Is Empty
Number
Equals, Greater Than, Less Than, Between, Is Empty
Date
Equals, Before, After, Between, Is Empty
Select
Equals, Is Empty
Add Export Actions
Let users export selected rows to CSV or PDF.
Ensure Reporting Controls is enabled
Click the Controls Actions tab
Click + Add Action
Configure the action:
Title: Export to CSV
Type: Export CSV
Columns: Visible Columns Only (or All Available)
Add another action for PDF if needed:
Title: Download PDF
Type: Download PDF
Click Submit Form
Custom Actions:
For advanced workflows, use Custom actions with JavaScript:
Configure Permissions
Ensure users can access reports and underlying data.
Project Level:
Go to Project Settings > Access
Find your Authenticated role
Enable Read All
Reporting UI Resource:
Go to Resources > Reporting UI
Click the Access tab
Enable Read All Submission for the Authenticated role
Source Forms:
Go to each form used in your report
Click the Access tab
Enable Read All Submission for the Authenticated role
Important: Users need Read All Submission on ALL source forms to see data in the report.
Reference
Report Configuration Options
Basic Settings
Report Title
Yes
Display name for the report
Report Name
Yes
Unique identifier (alphanumeric, underscores, dots, dashes)
Items per page
No
Records per page (default: 10)
Cache requests
No
Store results in cache for performance
Cell max width
No
Maximum width of grid cells in pixels
Reporting Controls Settings
Enable Control Panel
Show/hide the controls panel
Control Panel Title
Header text for the panel
Controls Panel Theme
Bootstrap theme (default, primary, success, etc.)
Initially Collapsed
Start with panel collapsed
Embedding Options
Using Report URL:
Using Report JSON:
Report Events
Subscribe to events for custom behavior:
rowClick
rowData, rowIndex
User clicked a row
rowSelectChange
selectedRows, gridInstance
Selection changed
fetchDataErrors
error, gridInstance
Data fetch failed
page
currentPage, gridInstance
Page navigation
changeItemsPerPage
itemsPerPage
Items per page changed
Data Persistence
Report settings (filters, column visibility, sorting) persist in the browser's local storage.
To reset settings programmatically:
Troubleshooting
Reports Loading Error
Symptom: Error when accessing the Reports tab in projects created before Reporting Module activation.
Cause: The project lacks the Reporting UI configuration resource.
Solution:
Go to Resources in your project
Click Import
Enter this embed URL:
{{ yourServerUrl }}/reportingui/configEnsure the resource is titled Reporting UI
Ensure the resource name and path is reportingui (exact spelling)
Unauthorized Error
Symptom: "Unauthorized" error when viewing an embedded report.
Cause: User lacks required permissions.
Solution: Verify these permissions are configured:
Project Level Access
Navigate to Project Settings > Access
Add "Read All" for your user role
Reporting UI Resource
Navigate to Resources > Reporting UI > Access
Add "Read All Submission" for your user role
Source Forms
Navigate to each source form > Access tab
Add "Read All Submission" for your user role
Module Not Found
Symptom: Cannot find module '@formio/reporting'
Cause: Module not installed correctly.
Solution:
Report.create is Not a Function
Symptom: Formio.Report.create is not a function or Formio.Report is undefined
Cause: Reporting module not registered before use.
Solution: Call Formio.use(Reporting) before creating reports:
Changes Not Appearing
Symptom: Report updates in the portal don't appear in your application.
Cause: Browser caching report settings in local storage.
Solution:
Clear local storage: Open browser DevTools > Application > Local Storage > Clear
Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
Or programmatically:
Date Operators Not Available
Symptom: Date operators (Date Difference, Day of Month, etc.) unavailable for some date fields.
Cause: Different date components save data in different formats.
Details:
Date/Time component: Saves as ISO format (works with date operators)
Textfield with Calendar: Saves as string (limited operator support)
Solution: Use the Date/Time component for fields you want to use with date operators.
Report Displays Incorrect Order
Symptom: Data appears in unexpected order.
Cause: Database updates can temporarily affect sort order.
Solution:
Click a column header to re-sort
Refresh the page
If persistent, check your default sort configuration
Last updated
Was this helpful?
