What are Reports?
Reports are views that allow you group the records in your objects so that you can see trends and compare values based on calculations.
A great example of this can be seen in our Donations Manager template app. In the app you can view a pie chart that displays how much money each event was able to raise compared to all of the money raised as a whole, a pivot table that displays the total amount donated for each event and a line graph that tracks how much was donated on each date.
What do Reports look like in a live app?
Currently, there are five report types available in Knack: Pivot Tables, Pie Charts, Line Charts, Bar Charts, and Area Charts. The following is a summary of the different report types available with Knack:
Pivot tables show calculations based on two groupings, rows and columns:
Pie charts show calculations as percentages of the whole based on a single grouping:
Line charts show calculations as a plotted line based on a single grouping:
Bar charts show calculations as bars based on a single grouping:
Area Charts fill in the area below the data points on a line chart and can help to visual trendlines:
Area charts can be set up in the follow ways under the Report > Layout Tab.
- Basic area chart shows a comparison between spending of each department by displaying the values overlapped on a single plane
- Normal stacked area chart shows how much each department contributed to overall spending, while showing the cumulative spending over time
- Percentage stacked area chart shows the percentage of spending by each department relative to 100% of the total
Where do I access Reports?
Reports can be added by selecting the Report option found on the ADD bar in the Pages section of the Builder:
Existing reports can be identified by the bar chart icon and 'Report' label next to the icon.
Add a Report
To add a report, select the Report option on the ADD bar in the Pages section of the Builder:
On the next page you will be prompted to choose the source object that your report will use. This will determine which records your report will work with:
Once you have added your report, you will be taken straight to the Report Editor so that you can build your report.
Edit a Report
To edit a report, click on the gear-shaped icon for that report and select the Settings option from the dropdown:
The report will open to a Report Manager page, where you will be able to view, edit and delete existing reports, as well as add additional reports, to your report view.
Knack Tip: Did you know that you can add more than one report to a single view?
You can click the Add a Report button on any available row or column on the report manager page to add a new report to your layout.
Reports are grouped into rows. Each row can have one or more reports, depending on the layout. Below you can see an example of a Report view with more than one row and column:
You can add additional rows by clicking the Add Row button:
You can also delete a row by hovering over the row and clicking the "trash can" icon in the top right corner of the row.
You can create additional columns for each row by hovering over a report row, clicking the layout drop-down and selecting the 1, 2 or 3 columns option:
Delete a Report
To delete a report from your page, click on the gear-shaped icon on the report and select the Delete option from the dropdown:
Warning: Please note that deleting a report will also delete any child pages connected to it.
To move your report and rearrange the layout of your page, click on the report and drag it above or below other views present on the page.
You can also move or copy your report onto another page by clicking on the gear-shaped icon for the report and selecting Copy or Move:
Whether adding a new report or editing an existing report, a window will open that will allow you to configure your report's settings. This window consists of three tabs: Source, Report, and Options.
The Source tab will display the Data Source of your report. You can also add Data Source filters for your report here as well. A filter icon to the right of the Data Source title indicates if filters to restrict the data being displayed on your view have been applied:
Note: Source tab filters do not remove rows from a report; they filter the records being aggregated in each row. So, if you add a data source filter for "Type is Business", excluded business records would still show, the Calculations for those records would just be 0. In order to remove the empty row from view, you would need to enable the exclude empty groups option.
The Report tab is broken up into two sections, Data and Layout.
Groupings and Calculations
The Data section is where you can determine how your records will be grouped as well as what calculations your report will display. Depending on what report type you select, different options will be available here:
Note: Equations cannot be used as rows or columns in pivot tables, but they can be used in calculations.
With each report you create, you will need to determine exactly how you want your records to be grouped and what will be calculated for each group. For bar, line and pie charts, you will be presented an option to group the chart and add a calculation:
- How will the chart group the records?
- Bar charts, line charts, and pivot table report types can have one or more groupings. However, pie charts can only have one grouping.
- What will the chart calculate for each group of records?
- Calculations can include a record count or a sum, average, minimum, or maximum of any numeric field. Pivot tables, line and bar charts can include more than one calculation.
Additional groupings and calculations can be added to bar charts, line charts and pivot table report types by selecting the green "+" button next to the current group or calculation.
Knack gives you the option to further filter your groupings when using Connection fields, Date/Time fields, and Multiple Choice fields.
Clicking the "options" link will open a popup that will allow you to edit the labels for your fields, sort or group your records, filter your records and determine exactly which records you want to show. Options vary, and aren't available across all field types.
The example below shows the available options for a Date/Time field:
Clicking the"options" link on a calculation row will open a similar window that will allow you to filter the values that are used in your calculation:
Note: Record filters do not remove rows from a report. The record is still returned as an axis label on the graph, but any reporting numbers will not include records excluded by those filters. In order to remove the empty row from view, you would need to enable the exclude empty groups option.
Row and Column Summaries
In pivot tables, you can add both column and row summaries if more than one calculation is used. These can be added in the "Data" section of the report editor under the "Row Summaries" and Column Summaries" section.
Note: Row and summary filters do not remove rows from a report. The record is still returned as an axis label on the graph, but any reporting numbers will not include records excluded by those filters. In order to remove the empty row from view, you would need to enable the exclude empty groups option.
You can further customize the look of your report under the Layout tab:
In the layout section you can:
Edit the title and description of your report.
Edit the data labels and tilt the group labels.
Change the location of the legend.
Customize the length and the width dimension of your report.
The Options section contains extra features that you can add to further customize your reports. You can also access filter options here.
- Exclude Empty Groups: This will remove groupings with no value (0) from your report.
- Allow Print and Export Options: This will add the Print and Export option to your reports. Please note that this option is not available for pivot tables.
- Click to Expand Group Records: This will allow users to click on your report groupings to open a popup with more details about the grouping.
- Hide Negative Ranges: This will hide negative ranges from your report.
- Don't allow records to be filtered: This will remove the filter option from your report.
- Enable users to filter records: This will give users the ability to add filters to your report. You can choose whether or not you want them to be able to filter based on the fields present in the report or all fields in your object.
- Use a filter menu: This option will allow you to create predesignated filters that users can use to filter records on the page.
Use Reports in your App
Knack gives you multiple options to view and analyze your data in meaningful ways. To learn more about including reports in your app's workflow, checkout our learn more article Reporting in Knack.
Notes & Troubleshooting
Our reports feature currently does not support calculations for record counts over 10,000 records. You could potentially display more than 10,000 records in a report, but each summation is limited to 10k records for its grouping.
If your source object has over 10,000 records, we advise adding filters to your data source to get the total record count under 10,000.
Every report has a grouping limit (the number of "cells" rendered) of 3,000 records. If you see an error when building your report, you will need to add filters to your groups to get the total number below 3,000 groups.
Here is how groupings are calculated:
(# of unique records in each row) * (# of records in columns (if any)) * (# of calculations).
Example: 100 orders and 3 vendors, and you calculate total number of records AND order total
= 100 * 3 * 2 = 600 groupings.
Data source filters do not restrict report groupings, as they are applied after the groups render. So, if you need to shave the number of groupings down in order to meet that 10,000 record limit, you will need to filter your report groupings. Filter options for groupings are only available for Connection fields, Multiple Choice fields and Date/Time fields.