Table of Contents

Excel report e-mail scheduler

Generate Excel reports from mSupply dashboard. Email the reports to custom created user-groups on pre-defined schedule. Supported Grafana version is later v8.0.0

This is a custom plugin which will need to be installed on your server. Contact mSupply support if this plugin is not available to you.

To use this plugin, the user needs to have Grafana administrative rights. The plugin icon does not show in the sidebar for non-administrative accounts. Therefore, if a local user needs to configure the Excel report e-mail scheduler, their user needs to be configured to have Grafana administrative rights. Please contact support@msupply.org.nz to arrange this.

Initial Plugin Setup

  1. Click on Settings on the sidebar menu (on the left-hand side of the mSupply Dashboard).
  2. Select the Plugins tab.
  3. Search for “mSupply”.
  4. Click on Excel report e-mail scheduler.



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

Click Enable for the plugin.

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

Please enter your administrator Grafana Details:

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

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




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!

Setting Up a Report Group

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

Selected Users

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

New users (or changes to a user’s details) will not be updated from mSupply into the Dashboard immediately. It is depending on the timing of the dashboard export scheduler in mSupply. If you require an immediate update for Reports, please complete a manual export of user table from mSupply to the Dashboard.

Click on Create Report Group or Update Report Group (When you edit) to save.

When you hover your mouse over the group, Edit and DELETE buttons appear.

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



Setting Up a Report Schedule

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



In the following window select Create new schedule. 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:

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:

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:

Press Create schedule button on the bottom of the page.

Once you saved the scheduler, you can press Send Test button (top right corner) from the edit schedules. Please note:

DELETE will remove the report schedule. You will receive a prompt to confirm deletion.



Report Template

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

1)
For more information on variables please refer to Grafana variables
2)
For more information on macros, please refer to Grafana macros