Variables
Variables are a Report Feature that allow the viewer of the report to make changes to the report filter without editing the report (or having edit permission).
Last updated
Was this helpful?
Variables are a Report Feature that allow the viewer of the report to make changes to the report filter without editing the report (or having edit permission).
Last updated
Was this helpful?
There will be occasions when an operator wishes to make adjustments to a report without going through the process of creating a new report or editing an existing report.
This is accomplished by declaring that certain filter criteria are Variables. The viewer of the report will be able to modify these Variables even if they don't have edit permission. The Variables are shown in the report viewer where changes are quick and simple.
Let's begin with a simple report to view the number of shipments for a specific courier, per month, over a given period.
We configure this report as a bar chart and when viewing it, we see the outcome
Imagine that someone wants to modify the date range at will. To do so they would clone the report and modify the filter. However this leads to duplicate reports and the viewer needs to have permission to create and edit reports.
Instead we can declare the date range to be variables.
Go to the Features Editor for this report
Here you can see what features have been configured for this report.
Click Add Item in the Variables section to create a variable and select the start of the date range as the filter and describe the variable (the name will be displayed in the viewer).
Repeat this for the Before date as well.
And save the changes. Now when you view the report you will see the variables.
Initially the variables will be set to the filter properties of the report. To change them, click on the variable control and after you have changed the filter click Update to refresh the report.
Now imagine you want to allow the viewer to switch between Purolator, DHL and FedEx. To do this simply add a variable for the Courier filter.
In this case we selected a Choice type. Unlike Text which allows the operator to enter any text they wish, Choice offers a drop-down selection of pre-determined values.
In this example we used the value=caption
format where the text displayed to the operator is on the right side of the quals sign while the actual value is on the left side. This allows you to use the carrier codes with a tidy presentation.
And when viewing you will now see the additional variable.