13.11. Saving report templates

Report templates are pre-set values for the filters used to create particular reports. They are a great way of assembling a set of frequently run reports and making sure they are generated with the correct settings.

To create a template, simply choose a report to run by clicking on its option in the Navigator or menus, choose all the filter settings that are to be part of the template then click on the Save Template button on the bottom of the report's filter window. Here's the current stock report's filter window showing the button:

You can choose settings for any of the drop down lists, checkboxes or radio buttons or enter any text in any of the text fields, in fact any of the elements that make up the filter - all will be remembered in the template. Below is an example for the current stock report which is set to report on all items with a name beginning with 'a' in the category 1 of 'Antibiotics', showing the Total stock for each item and which will be opened in Excel:

If you are in supervisor mode, you can select which stores the report is run over. The stores you include in the report are also saved with the template. The first store in the list is selected by default so that at least one store is always selected so, if you forget to select the correct stores you wish a report template to be run over, you might get a shock when you run it outside supervisor mode - the report might be run over a different store!

If you want the report to be run over the currently logged-in store only then don't create it in supervisor mode, create it while logged into any store.

When you click on the Save Template button, a window opens for you to enter the template's details:

  • Report name: Enter the name the template will have in mSupply. Make it meaningful so that you know what report you're running when you select it. e.g. “Monthly stock report”
  • Form to use for printing: Select which of the report printout forms you want to use for this template. If you have had a custom report made for you, it will probably appear in this list. If you haven't there will only be one item in this list.
  • Comment: Enter anything you want to remember about the template for you and others to see. You could enter the purpose of the report or the reason the template was created.
  • View preferences: Check the Public checkbox if you want all users to be able to see the template in the list and therefore run it. If you leave it unchecked then this template will only be visible, and therefore runnable, by you.
  • Edit preferences: Check the Public checkbox if you want all users to be able to edit the template, leave it unchecked if only you should be able to edit it. Please note that you can only edit the details on this window for a template, not the actual filter settings made on the previous screen. If you want to edit those, just delete the template and re-create it with the changed filter settings.

When you're finished, click on the OK button to save the template.

To run the templates you have created, choose Report > Run saved report… in the menus:

or click on the Run saved report item on the Reports tab of the Navigator:

Either way, a window is displayed containing all the names of the report templates that have been created and that you are allowed to run (either you created or others created with the Public viewing preference checked):

Note that the report templates are displayed in alphabetical order of name so, if you want them to appear in a particular order in this window, put a number at the beginning of all your template names.

To run a report template, simply double-click on it and the report filter window will appear with the settings you selected when you created the report template. In this example, selecting the “Monthly stock report” template, created in the Creating templates section above, opens the report filter window like this:

Note that the filter settings are exactly the same as saved in the template. You can still manually change the filter settings in this window if you wish. Clicking on the OK button will run the report as usual and bring up the print options window:

The Form to use drop down list will be set to the form you selected in the Form to use for printing drop down list when you saved the template. Again, you are free to manually change any of the settings in this window if you want to. To finally print out the report, click on the OK button.

In this way, you can see that to run any particular report template takes only 3 mouse clicks, no typing and no thinking. That's very helpful if you have to run the same set of reports every month for example!

To edit or delete report templates, choose Reports > Manage report templates… in the menus or click on Manage saved reports on the Reports tab of the Navigator to open this window:

The table contains a list of all the report templates that have been created in the system.

The Quick search text field allows you to filter which templates are displayed: only templates with names containing the text you type in here are displayed in the list. Handy for finding a particular template if there are a lot in the list.

  • Delete button: to delete a template, click on it in the list to select it then click on the Delete button to delete it. After you confirm the deletion the template will be removed.
  • Run button: select a template from the list then click on this button to run it (same as selecting Report > Run report templates… from the menu and selecting the template there).
  • Duplicate button: you can duplicate a template by selecting it in the list and clicking on this button. The duplicate is added to the end of the list and has the same name as the template you selected but with “ [duplicate]” added to the end.
  • Edit button: To edit a report template either select it in the list and click on this button or double-click on it in the list. When you do so, the template's details window is displayed and you can edit the details as required: Note that these are the only details you can edit for a template; you cannot edit the template's filter settings. If you want to do that, delete the template and re-create it with the new filter settings.

  • Last modified: 2022/02/15 12:55
  • by Gary Willetts