On this page

Search

There are two types of reports in Totara's report builder: User reports and Embedded reports

User reports are the reports that Site Administrators and Site Managers create and make available to other users. Once a report has been created, it can be viewed in two places. Firstly, you can view created reports in the Reports tab (in the top navigation bar). From the reports page you can click on a report to select it, then select Edit this report. In the report manager page (Quick-access menu > Reports) you can view a report by clicking on its title or view link. You can update a report by clicking the Settings button () under the Actions column or remove it using the delete button. 

Embedded reports are used throughout Totara to display important data and information such as within system reports. Click the Settings button under the Actions column to modify an embedded report. To reset the report back to its default settings, click the Restore default settings button under the Actions column. If you want to repurpose any embedded reports it is strongly recommended that you do not edit the embedded reports themselves, as these are typically used in multiple places across the system and editing these reports can have unintended consequences. Instead, you should duplicate the embedded report if you want to use it for another purpose.

For more information on editing user or embedded reports see the Managing reports help documentation. 

Create a user report

  1. Under the quick-access menu go to Reports > Create report or select Reports in the top navigation bar to go to the reports dashboard, then Create report.
  2. Select a report source from the Create report list. This will be the data source for the report. See Report sources for more information on available data sources and options. 
  3. Review the details and description, then select Create and edit.
  4. Amend your report title.
  5. You can now configure the various settings as required. 
  6. Once you are done remember to click Save changes on each tab before moving on, as changes are not automatically saved when switching between tabs.

Report sources and report templates (see below) on the Create report page can be searched and filtered to find exactly what you're looking for.

Report templates

Instead of selecting a report source, you can create a report based on a pre-configured report template, which will allow you to explore your data immediately. These templates provide a starting point which you can edit to fit your exact requirements. As with reports created from a report source, the report can be fully customised by selecting Create and edit when initially creating the report, or Edit this report once the report has been created. You can add or remove columns, change the order of columns, display a graph, add filters, and more. In the Filters list you can filter the templates based on the user's role, such as reports for managers to use.

Report templates with the 'manager' filter applied.

The following templates are currently available for these roles:

  • Administrator
    • Admin site activity overview
  • Learner
    • Learner certification completion status overview
    • Learner course completion status overview
    • Learner goal status overview
    • Learner program completion status overview
  • Manager
    • Manager certification completion status overview
    • Manager course completion status overview
    • Manager goal status overview
    • Manager program completion status overview

Totara Partners are also able to develop new templates for other common use cases.

Clone a report

Once a report has been created it is possible to clone it. Both user reports and embedded reports can be cloned.

  1. Select the user report or embedded report.
  2. Click the Clone report icon ().
  3. 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.

Report settings 

General

Here you can update any of the following general report settings:

SettingDescriptionNotes
Report Title

This is the name that will appear at the top of your report page and in the Report Manager block.

-
AbstractA short summary of the report that will be displayed in the user reports list.Including an Abstract helps users to understand at a glance what the report is for, helping them to find the report they need and preventing duplicate reports from being created.
DescriptionWhen a report description is created the information is displayed to users in a box above the search filters on the report page.The Description field should be used to describe what is shown in the report and when/how it should be used.
SourceThe 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 on user reports listWhen 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 also determines the number of rows that will be shown in the report table block.

-
Report type

This is an informational field that displays whether this is a user report or an embedded report.

-

Columns

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.

SettingDescriptionNotes
Column

Data available for reports depends on the source, but may include:

  • User profile information
  • Competency details and learner completion status
  • Course details and completion status
  • Seminar event details and attendance
  • Assignment submissions
  • Audiences
  • Program details and learner completion status

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:

  • Counts for each record, count of unique values in the field
  • Average, Total, Max, Minimum for numeric columns
  • Time period from hours, days, weeks, months for time columns

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. 

Customise heading

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.

-

Options

This column allows you to perform a number of actions:

  • Show/Hide: Use the eye icon to show or hide a column from the report
    • Open eye means the column is visible ()
    • Crossed out eye means it is hidden ()
  • Delete: Use the cross icon () to delete a column from the report
  • Arrange: Use the up () and down () arrow icons to arrange the order of the report columns from left to right
-
Sorting

The Sorting section allows you to setup default behaviour for column sorting.

  • Default column: Choose the default column to sort
  • Default order: Set the order to to sort by

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. 

Aggregation examples

Assume that the following is the output of my report with no aggregation or grouping turned on:

USER NAMECOURSE 
Sample UserCourse A 
Sample UserCourse B 
Sample UserCourse A


Comma separated values: Lists the values from the column in one row.

If the Comma Separated Values option is turned on for column two (the courses) it produces:

USER NAMECOURSE 
Sample UserCourse A, Course B, Course A


CSV without duplicate: Same as CSV, but if Course A is listed twice, this would just show once for the user.

USER NAMECOURSE 
Sample UserCourse A, Course B


Count: Instead of listing course names, it would have a count for the column.

USER NAMECOURSE
Sample User3


Count unique: Eliminates duplicates from count.

USER NAMECOURSE
Sample User2

Grouping examples

Dates: Date groupings will group by the date/time format chosen.

Assume that the following is the output of my report with no aggregation or grouping turned on:

USER NAMELAST SYSTEM ACCESS DATE
Sample UserJanuary 1, 2010
Sample TwoFebruary 1, 2016
Sample ThreeJanuary 1, 2016


To produce the numbers, not the names, of the users accessing the system set the User Name or ID to a count field and the date field use whatever grouping format required.

User Name (Count) | Last System Access Date (YYYY)

USER NAMELAST SYSTEM ACCESS DATE
12010
22016


User Name (Count) | Date YYYY-MM

USER NAMELAST SYSTEM ACCESS DATE
1January 2010
1February 2016
1January 2016


User Name (Count) | Month of Year

USER NAMELAST SYSTEM ACCESS DATE
2January (even if these aren’t the same year, both accesses took place in a January)
1February

Graph

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
  • Area
  • Donut
  • Progress Donut (only works in ChartJS)

The graph settings can be configured to your preference, if you want you can even use the Advanced settings section to further tailor the graph. 

You can find out more about customising your graphs through the advanced options in the Dev docs

You can change your graph library from the default (ChartJS) by navigating to Quick-access menu > Reports > General settings, then select an option for the Graph Library setting.

Filters

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.

FilterDescriptionNotes
Search FieldUse 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.

-
Filtering requiredTick the Filtering required box to make a search field mandatory. This means that users will need to select an option for this search field before they can run and view the report.The Filtering required option can be used to ensure that report viewers do not run reports that will return huge numbers of results. By requiring viewers to narrow down the number of results by selecting options for the required fields you can ensure that this does not happen.
OptionsTo 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.

FilterDescription

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 NameNext 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 boxThe 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 FieldUse 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.
OptionsTo 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

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.


These restrictions do not apply to scheduled reports.

SettingDescriptionNotes
Report content

Allows you to select the overall content control settings for this report:

  • Show all records: Every available record for this source will be shown and no restrictions will be placed on the content available

  • Show records matching any of the checked criteria below: Display records that match any of the criteria set below
  • Show records matching all of the checked criteria below: Display records that match all of the criteria set below

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

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 audienceRestrict 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.

-

Access

The Access page allows Site Administrators to grant users access to view the content of the report 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 the user's role. 

SettingDescriptionNotes
Restrict access

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.

  • Context: The location or level within the system that the user has access to. For example a Site Administrator would have system-level access (context), while a Learner may only have course-level access (context). Context allows you to set the context in which a user has been assigned a role to view the report.

  • Roles with permission to view this report: Restrict the visibility of a report to specific system roles. Only when the user possesses the correct system roles (e.g. Learner) at the time the report is to be viewed will the Reports tab appear in the Totara menu.
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.

Performance

The Performance page provides access to performance-based settings for each report.

SettingDescriptionNotes
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 CachingWhen 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.

To set caching performance options, report caching must be enabled first on the Configure features page. See Configure features for more information.

Cache ScheduleDetermines 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 TimeAll 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.-
Generate Now

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 set up 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, in order to improve performance.

These settings should be considered highly advanced. It has to be configured by sysadmin in config.php and has to be manually enabled in individual reports by 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.
//
// $CFG->clone_dbname = 'xxx';
// $CFG->clone_dbhost = $CFG->dbhost; // optional
// $CFG->clone_dbuser = $CFG->dbuser; // optional
// $CFG->clone_dbpass = $CFG->dbpass; // optional
// $CFG->clone_dboptions = $CFG->dboptions; //optional


Totara Academy

The Totara Academy has a whole course dedicated to using Reports in Totara. Here you can learn more on how to use reports, see best practice, and give it a go yourself.


Provide feedback about this page using the link in the bottom right of this page. 

 Still have questions? 

Why not post them in the forums on the Totara Community?