This is an old revision of the document!


  1. Click on Settingson the sidebar menu (on the left-hand side of the mSupply Dashboard).
  2. Select the Plugins tab.
  3. Search for “mSupply”.
  4. Click on the mSupply option.
  5. Click Enable for the mSupply plugin.



Once enabled, the mSupply icon will be displayed on the sidebar menu above the settings button.

The App Configuration window will open and you will need to complete this form before you start to use the reporting functionality.



Please enter your administrator Grafana Details:

  • Username and password
  • URL for your mSupply Web Dashboard

Please enter the Email Details for the account from which emails will be sent:

  • Email address and password
  • Email host and port (from your email provider: this will be the same details that you would enter when creating a new email account)

Your email provider's security settings may require additional steps to allow email setup.

For Datasource, please select the source location for your mSupply data. In most cases this will be PostgreSQL. If you are not sure, please check with your mSupply consultant.

Once completed, please select Submit.

  • If the form is incomplete or the information provided is incorrect, you will receive an error message on submission. Please follow the instructions given in the error message.
  • On successful submission, you will receive the following message:




Selecting Disable will deactivate the mSupply plugin and you will need to repeat the above in order to enable it again.

You are now ready to get started creating Reporting Groups!

To access report groups, select the mSupply icon from the sidebar menu and select Report Groups from the drop-down menu.


In the following window select Add report group to add a report group (yes, sorry – that was a bit obvious!). This will create a New report group as seen below – click on this row to edit the report group details.



Edit report group details page:




In the Edit details section there are free-text boxes for:

  • Name
  • Group description

Then select the users that you want to be in your report group.

  • A list is provided of all mSupply users
  • mSupply users without an email address will appear in the list but are not selectable

New users (or changes to a user’s details) will only be updated from mSupply into the Dashboard every 24 hours. If you require an immediate update for Reports, please complete a manual export from mSupply to the Dashboard.

To save and close press the X in the top right corner.

Delete will remove the report group. You will receive a prompt to confirm deletion.



To access Report schedules, select the mSupply icon from the sidebar menu and select Report schedules from the drop-down menu.



In the following window select Add schedule to add a report schedule (sorry again!). This will create a New report schedule as below – click on this row to edit the schedule details.



Edit report schedule details page:



In the Edit details section:

  • Name: free-text box that will also be the email subject.
  • Description: free-text box
  • Report group: select the name of the group that should receive the report
  • Report interval: select the required reporting period from the drop-down box

The emails will be sent according to the selected interval from the time the report schedule is created. For example, if a daily schedule is set up at 9am on 1 January 2021, the email will be sent every day at 9am from 2 January 2021.

Then select from the Available Panels to be displayed in the report:

  • Any number of panels can be selected. Each panel will be on a separate worksheet in an attached Excel workbook.
  • Only “table” panels are supported.

For each panel selected, you will also need to specify the Variables to be displayed in the emailed report. This is done via the drop-down boxes that will be displayed once a panel is selected as shown in the below example for Expiry Items.



Using the drop-down boxes, you can choose the variables (in this case Store and Item) that you want displayed in the emailed report. Only the variables displayed within the Report Schedule screen are available for each panel.

The Grafana format of variables must be in the form: ${variable} or ${variable:sqlstring}. Other formats are not supported for dashboard reports. 1)

Grafana macros are not supported with the following exception:

  • The $ timeFrom and $ timeTo and $ timeFilter macros are supported using a Lookback variable. The $ timeTo date is set to date of report creation. The $ timeFrom will then be calculated as ($ timeTo – Lookback).
  • For example, if you set a lookback period of 7 days and create a daily report starting on 1 January 2021. The first report’s $ timeFrom will be 24 December 2020 and the $ timeTo will be 1 January 2021. The second report’s $ timeFrom will be 25 December 2020 and the $ timeTo will be 2 January 2021. 2)

Once you have selected your variables, you can press Send Test button (top right corner). Please note:

  • Send Test will not affect the timing of the schedule (the timing of the schedule is dependent on the time you save and close the report schedule)
  • Send Test will send the email to all users in the report group!

To save and close press the X in the top right corner.

Delete will remove the group. You will receive a prompt to confirm deletion.



The panels selected in a report schedule will be sent via email in an Excel workbook:

  • Each panel will be on a separate worksheet.
  • Each worksheet will display in the title:
    • Date of Creation
    • Name of the Panel

1)
For more information on variables please refer to Grafana variables
2)
For more information on macros, please refer to Grafana macros
  • en/dashboard/reports.1631755997.txt.gz
  • Last modified: 2021/09/16 01:33
  • by Mark Glover