There are two types of reports: in Totara Learn User generated reports and Embedded reports.
User generated reports are the reports that site administrators create and make available to other users. Once a report has been created, it can be viewed by clicking on the title or view link. To update a report, click the Settings icon button under the Options column or remove it using the delete button.
Whereas embedded reports are used throughout Totara Learn to display data. Click the Settings button under the Options column to modify an embedded report. To reset the report back to its default settings, click the Restore default settings button under the Options column.
For more information on editing user generated or embedded reports see the Managing reports help documentation.
You can also find more about reporting on our website.
Create a user generated report
- Under the Site administration menu go to Reports > Report builder > Manage user reports.
- Enter a Report Name, this is the name for the report that the user will use to run the report.
- Next choose a Source from the dropdown menu. This will be the data source for the report. See Report sources for more information on available data sources and options.
- Decide if you wish to Hide in My Reports. When checked, this report will not be displayed on the My Reports page for users, but will be accessible via its URL.
- Click the Create report button.
- You can now configure the various settings to your preference.
- Once you are done remember to click Save changes.
(This video is taken from the Reports course in the Totara Academy, where you can access more resources and learning materials - including other videos).
Clone a report
Once a report has been created it is possible to clone it. Both user created and embedded reports can be cloned.
- Select the user generated or embedded report.
- Click the Clone report icon ().
- Click the Clone button.
Cloning a report creates a full copy of the report and its columns, filters and settings.
Cloning a report does not copy any scheduling or caching that has been set up for the report.
In order to clone a report the user must have the Create, edit and delete report builder reports (totara/reportbuilder:managereports) capability.
Here you can update any of the following general report settings:
This is the name that will appear at the top of your report page and in the Report Manager block.
|Description||When a report description is created the information displays in a box above the search filters on the report page.||-|
|Source||The source for this report will be displayed.|
Once saved, a report source cannot be changed. To use a different report source a new report must be created.
|Hide in My Reports||When checked, this report will not be displayed on the My Reports page for users, but will be accessible via its URL.||-|
|Number of records per page|
Enter the number of rows that will appear on each page of the report. At the bottom of each page, the user can click to view the next page of data.
This is an informational field that displays whether this is a user generated report or an embedded report.
The Columns tab allows you to select the columns that will be available on the report.
A set of default columns will be displayed based on the report source that was selected. Additional columns can be added by clicking the Add another column dropdown.
Data available for reports depends on the source, but may include:
See Report sources for more information on available data sources and column options.
Any custom fields added will automatically be available in the relevant report column.
There will be a warning if you use a combination of columns and/or aggregation methods that are incompatible with one another. To fix the problem simply change one of the columns or aggregation methods flagged in the warning.
|Aggregation or grouping|
For each record that has the same value a calculation that is related to the column field type can be chosen, this includes:
Some reports already use data aggregation internally, in which case a warning is displayed under the report Columns tab.
See more on aggregation and groupings, including examples below this table.
Next to each column, tick the check box under the Customise heading and enter a new column title if you want to override the existing title.
This column allows you to perform a number of actions:
The Sorting section allows you to setup default behaviour for column sorting.
For example, if you selected User's fullname as the Default column and Ascending (A to Z, 1 to 9) as the Default order, then by default the report would be sorted using the ascending alphabetical order of the user fullname column.
|Note that the user running the report will be able to sort by other columns as well by clicking on the column heading.|
Aggregation and grouping examples
It is not possible to have multiple count aggregations in a report that use the same field for data. This is because once the field has been grouped for the first count is it not ungrouped again, meaning any subsequent counts will simply reflect the number form the initial count.
Therefore it is advised where possible you use columns that are already aggregated.
For example, if you wanted to aggregate course completion, using both the Number in progress and the Number completed columns from the Course Completion by Organisation report source will work, as these columns already contain an aggregated number.
However, using both the Is in progress? and the Is complete? columns from the Course completion report source with the count aggregation set on them will not work, as the aggregation would be correctly calculated for the first column but then repeated in the second as they use the same field for aggregation.
This allows the results from the aggregation of columns in the report to be graphed using a variety of graph types including column, line, horizontal bar, pie, scatter, and area.
The graph settings can be configured to your preference, if you want you can even use the Custom settings section to further tailor the graph. If, for example, you'd like to change the colour of the graph then this can be done by using hexadecimal colours, e.g colours = #ff0000 would change the graph colour to red. If you have a graph with multiple colours, such as a pie chart or bar graph, you will use the same format and list the colours so they are separated by a comma e.g. colours = #ff0000,#00ff00,#0000ff.
A list of all available settings can be found at http://www.goat1000.com/svggraph-pie.php
Remember, the format of the Custom setting is: [ setting name ] = [ parameter ].
The Filters tab allows you to select the search filters which will appear at the top and side of the report.
There are three types of filters available:
- Standard filters: Standard filters appear at the top of the page above the columns of data in the report. The user can enter/select criteria and click the Search button. Additional filters can be added to the page and hidden behind an Advanced button to allow users access to less commonly used filters.
- Sidebar filters: Sidebar filters appear in a column on the side of the page. The user can put a tick in the check box next to the items they wish to filter by. A number displayed next to each filter option shows how many courses meet the criteria. As soon as the user clicks, the page automatically refreshes to display the appropriate course(s).
- Toolbar search: The toolbar search allows the user to search multiple fields for text, including the Course Name, Summary, Shortname, ID Number, Course Category, and Tags. Site administrators define which of these fields will be included in the search.
Standard filter options
Standard filter options allow you to customise how the filters appear above your report. The available filters are determined by the source of the report. Each report source has a set of default filters.
A filter can appear in either the standard filter area or the sidebar filter area, but not both. Filters can be added, sorted, and removed.
|Search Field||Use the Search Field options to select the fields that users will be allowed to search by. Additional filters can be added by clicking the Add another filter dropdown.|
|Customise Field Name|
Next to each filter, tick the check box under Customise Field Name and enter a new label that will be displayed next to the filter when the report is run.
Check the Advanced? box next to any search options that should be available if the user clicks the Show advanced button on the report. This option is helpful to make infrequently used search options available, but hidden by default.
|Options||To delete a filter from the report, click the Delete icon under the Options column. To rearrange the order of the filters on the page, click the up and down arrows. The filters will appear in the Search by box in the order they are listed.|
Sidebar filter options
Sidebar filter options allow you to customise the filters on the side of your report. Sidebar filters have instant filtering enabled, each change made to a filter will automatically refresh the report data.
A filter can appear in either the standard filter area or the sidebar filter area, but not both. Filters can be added, sorted and removed.
|Use the Search Field options to select the fields that users will be allowed to search by. Additional filters can be added by clicking the Add another filter dropdown.|
|Customise Field Name||Next to each filter, tick the check box under Customise Field Name and enter a new label that will be displayed next to the filter when the report is run.|
|Advanced?||Check the Advanced? box next to any search options that should be available if the user clicks the Show advanced button on the report. This option is helpful to make infrequently used search options available, but hidden by default.|
|Toolbar search box||The toolbar search box allows users to search multiple fields by text, such as the course name and summary, instead of filtering individual fields.|
Disable toolbar search box
|Checking this box will prevent the search box from appearing at the top of the page.|
|Search Field||Use the Search Field options to select the fields that users will be allowed to search by. Additional filters can be added by clicking the Add another search column dropdown.|
|Options||To delete a filter from the report, click the Delete icon under the Options column. To rearrange the order of the filters on the page, click the up and down arrows. The filters will appear in the Filter by box in the order they are listed.|
Content controls allow you to restrict report content based on the user who is running the report. This allows site administrators to pre-filter the report so that one report can be run by many users on the system by only showing the data most pertinent to the user. For example, a report can be designed for managers to run that will only display data for their direct reports.
Allows you to select the overall content control settings for this report:
It is then possible to configure the criteria for the Report content settings above. The criteria available will differ based on the report sources, and can include restrictions based on users, positions or dates.
|Show by user|
Show records based user: When selected, the report shows different records depending on the user viewing the report and their relationship to other users.
|Include records from a particular user|
Decide whether a user can see only their own records or those of reports (select from direct, indirect and temporary).
|Show by the user's current position|
When selected, the report displays results dependent on the user's assigned position.
|Include records from child positions|
Select which level to show reports from, this could be at or below the user's position.
|Show by the user's current organisation|
When selected, the report displays results dependent on the organisation the user has been assigned to.
|Include records from child organisations|
Select which level to show reports from, this could be at or below the user's organisation.
|Show by the organisation when completed|
When selected, the report displays results dependent on the organisation the user was assigned to when they completed the course or competency.
|Show records by audience||Restrict report results by audience so you only see data for that sub-set of users.||-|
|Show by time created|
Show records based on the record date: When selected, the report only displays records within the time frame selected.
|Include records from|
Show records from the past, future, last 30 days, next 30 days, current financial year, or previous financial year. Check the Include record if date missing option to include records with no date in your report.
|Show by event roles|
When enabled, seminar report source content can be restricted to users who hold a particular event role e.g. Trainer. An event role must be enabled on the seminar global settings in order to select it as a content restriction.
The Access page allows site administrators to grant permission to access the report to other users based on their role. There are two sections, the first allows you to decide whether everyone or only those matching criteria can access the report. The second allows you to set those criteria based on a the user's role.
Allows you to select whether All users can view this report or if Only certain users can view this report based on the controls selected.
|Restrict access by role|
Set the role criteria for access to the report, using the context as well as the specific role a user has.
|Note that the Staff Manager role is typically assigned at the user context rather than the system level. If you need Staff Managers to view the report then you should use the Users may have the role in any context setting.|
The Performance page provides access to performance-based settings for each report.
|Restrict initial display|
Controls how the report is initially displayed and is recommended for larger reports where you will be filtering the results. When this setting is enabled, it increases the speed of the report by requiring the user to apply search filters and click the Search button before displaying report data.
|This setting will be enabled (ticked) or disabled (unchecked) by default depending on the global setting Restrict initial display in all report builder reports.|
|Enable Report Caching||When checked, a copy of this report will be generated on a set schedule and users will see the results of the stored or cached version report. This will make displaying and filtering of the report faster because it does not have to generate results every time it is accessed. Note that the data displayed will be from the last time the report was generated rather than 'live' data. We recommend enabling this setting only if necessary (reports are taking too long to be displayed), and only for specific reports where this is a problem.|
|Cache Schedule||Determines the schedule used to control how often a new version of the report is generated. The report will be generated by the background server job a.k.a. cron job that immediately follows the specified time. For example, if you have set up your cron to run every 20 minutes at 10, 30 and 50 minutes past the hour and you schedule a report to run at midnight, it will actually run at 10 minutes past midnight.||Cached reports are prepared one after another i.e. when the first is finished the second is started. This is done in one stream to avoid database overload. If there is more than one report requiring caching, a delay is possible depending on the size of the reports. The order is not specified and it is not guaranteed that report caches will be refreshed in the same sequence each time.|
|Current Server Time||All reports are cached based on server time. Cache status shows you current local time which might be different from the server time. Make sure to take into account your server time when scheduling cache.||-|
If checked, then report cache will be generated immediately after changes are saved.
Note that both the Restrict initial display and Enable report caching features are setup on a report-by-report basis and that a report need not have both or either of these options enabled.
|Use database clone|
It is now possible to configure a second database connection for use by Report Builder. The purpose of this secondary connection is so that you can direct the main Report Builder queries at a read-only database clone, this can be done to improve performance.
These settings should be considered highly advanced. It has to be configured by sysadmin in config.php and has to be then manually enabled in individual reports by Totara a Site administrator via the Report Builder (this setting).
It is suggested that sysadmins create a separate database instance with an exact clone of the production database that is kept in sync automatically.
Support cannot be provided on configuring a read-only slave and so you will need in house expertise to achieve this.
The only technical requirement for the databases is that the main database must be ACID compliant.
Those wishing to use the second database connection can find instructions for it within config-dist.php. You can use a read-only database clone. These settings allow admin to configure a second database:
// connection that will be used for selected Report Builder reports to improve performance
// and lower the main database load.