Home → Reports in Evergreen → Editing and Creating Templates → Creating Templates
Last Updated 12/27/2024
Once you have created a folder, the next step in building a report is to create or clone a template. Templates allow you to run a report more than once without building it anew every time, by changing definitions to suit current requirements. For example, you can create a shared template that reports on circulation at a given library. Then, other libraries can use your template and simply select their own library when they run the report.
It may take several tries to refine a report to give the output that you want. It can be useful to plan out your report on paper before getting started with the reporting tool. Group together related fields and try to identify the key fields that will help you select the correct source.
It may be useful to create complex queries in several steps. For example, first add all fields from the table at the highest source level. Run a report and check to see that you get results that seem reasonable. Then clone the report, add any filters on fields at that level and run another report. Then drill down to the next table and add any required fields. Run another report. Add any filters at that level. Run another report. Continue until you’ve drilled down to all the fields you need and added all the filters. This might seem time consuming and you will end up cloning your initial report several times. However, it will help you to check the correctness of your results, and will help to debug if you run into problems because you will know exactly what changes caused the problem. Also consider adding extra fields in the intermediate steps to help you check your results for correctness.
This example illustrates creating a template for circulation statistics. This is an example of the most basic template that you can create. The steps required to create a template are the same every time, but the tables chosen, how the data is transformed and displayed, and the filters used will vary depending on your needs.
To create a new template, you will need to start from a template folder.
The key to creating a report template is in selecting the appropriate fields to collect the information you are looking for in your report. This is done in the three field selection panes in the middle of the page.
The following steps provide an example for creating a standard Circulation Report.
The top left hand pane contains the database Core Sources drop-down list. This is the list of tables available as a starting point for your template. Commonly used sources are:
Note: The checkboxes in the sources list is for advanced reporting and should be left unchecked by default.
Select the source you plan to use from the drop down menu. In this example, we will be creating a circulation report. To do this, we will select Circulation in the Sources dropdown menu. Note that the Core Sources for reporting are listed first, however it is possible to access all available sources at the bottom of this dropdown menu. You may only specify one source per template.
After selecting your source, a tree menu will populate underneath the drop down menu. In our example, we will click on the top option in this menu, Circulation.
Clicking on Circulation will retrieve all the field names in the pane underneath the tabs. The icon in front of each option on that list indicates the data type of the value in the field. To finish creating your field, select the specific field you are interested in adding to your report from the middle Field Name pane. To make this circulation report, we will select Circ ID.
Selecting the field name will populate the field in the right hand pane. You can change the label for this field by editing it directly in the Name field.
Next to the name field, there is also a drop-down menu for transforms. This is where you choose how to manipulate the data from the selected fields. For the circulation report we're creating, we want to count the number of circulations, so we will select Count from the Transforms list.
Field Transforms have either an Aggregate or Non-Aggregate output type. See the section called Field Transforms for more about Count, Count Distinct, and other transform options.
Add other data to your report by going back to the Sources pane and selecting the desired fields. In this example, we are going to add Circulating Item → Shelving Location to further refine the circulation report.
Shelving Location is listed in the Circulation table. To access it, click on the arrow next to Circulation in the Core Source pane This will expand the tree.
Note: When you are creating a template take the shortest path to the field you need in the left hand Sources pane. Sometimes it is possible to find the same field name further in the file structure, but the shortest path is the most efficient.
When we select Shelving Location from the tree menu, it will populate a list of field names related to Shelving Locations. For this report template, we really just want to know the number of circulations for each shelving location, so this field exists to tell us the shelving location names. So let's select "Name" from the list of available fields.
In our report, we want to see the Shelving locations first and then the count for all circulations from that shelving location in the next column. To change this order, click on the up/down arrows next to the Shelving Location field to move it up.
When you run a report, you will have the opportunity to set the date frame contained in the report. However, if you want to add the specific dates as a field that will be visible in your report output, you can add it just like any other field.
For this example report, we specifically want to add the circulation date. Return to the Sources pane and click Circulation to populate the Fields pane with those same original Field options we saw when we selected Circ ID for our first field. This time, select Check Out Date/Time from the middle Field Name pane.
In the Transform drop-down, you will see a very long list of options. Many of them are date related. The one you choose will be dependent on the purpose of your report. For this report, we don't want to get too granular by looking at the individual dates. Since we are looking for a count of circulation by shelving location, an aggregation of that count by month and year will work. Let's select Month from the list of options.
Note: The Field Transform you selected can be changed after adding the field to your list by clicking on i and selecting Change Transform from the Actions drop down menu.
In order to save your template to run reports, make sure you have given the template a unique name, and click the Save Template button at the top of the page.