Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space TL25PMS and version Evergreen

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. 

Create a user generated report

  1. Under the Site administration menu go to Reports > Report builder > Manage user reports. 
  2. Enter a Report Name, this is the name for the report that the user will use to run the report.
  3. 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. 
  4. Decide if you wish to Hide in My ReportsWhen checked, this report will not be displayed on the My Reports page for users, but will be accessible via its URL.
  5. Click the Create report button.
  6. You can now configure the various settings to your preference. 
  7. Once you are done remember to click Save changes.

Widget Connector
urlhttps://www.youtube.com/watch?v=tNdJJt2Mslo&feature=youtu.be

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

  1. Select the user generated 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.

Note

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 
Anchor
settings
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.

-
Report summaryA short summary of the report that will be displayed on the report creation page. -
DescriptionWhen a report description is created the information displays in a box above the search filters on the report page.-
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 in My ReportsWhen 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.

-
Report type

This is an informational field that displays whether this is a user generated 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 report columns
-
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 
Anchor
aggregation_grouping
aggregation_grouping

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. 

Advanced Panelbox
id3

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
Advanced Panelbox
id3

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

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

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.

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

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.

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

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

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 roleSet 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 possess 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.
Info

To set caching performance options, report caching must be enabled first on the Advanced features page. See Advanced 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.

Info
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.
//
// $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




Panel
borderColor#d3d3d3
borderStylesolid
titleOn this page

Table of Contents
maxLevel3
minLevel2
printablefalse

Panel
borderColor#955C80
borderStylesolid

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