Runtime Variables
If you have set up a job stream, this form eliminates the need to edit selections for each report in the job stream if the report has one or two parameters that may change each time the job stream reports are submitted to the task queue. If one of the parameters for a job stream changes every time the job stream is submitted, you can define it as a runtime variable.
To define a runtime variable, enter a Name which relates to the parameter that is variable, and select what data type the parameter is:
- Date
- Alphanumeric
- Decimal
- Integer
Then enter a value for the data type.
Using Runtime Variables
In this example, the AR Tax Summary report is included in a job stream, and that the period end date is a variable parameter for running that report on a periodic basis. The user-defined name AR Tax Summary Period End Date is linked to the period end date parameter for the AR Tax Summary report. The date 30/09/19 defaults to the report parameters when it runs.
Next, select System > Customisation > Reports, and select AR Summary report. Click on Edit to view the report in design mode. Right-click in the white section at the bottom of the report, and select Parameter Setup. This field displays the report's parameters.
Select the parameter that is of the runtime variable that you defined. Then, click the Runtime Variables button and select the variable that is defined for this parameter. Click OK.
The runtime variable now defaults to the Enter value of variable field on this form for reference. If you want to view this variable at runtime to enter a value for it, select Yes under the Visible to user at runtime option. Otherwise, select No.
Note: Click No if the default value entered for the variable in Runtime Variable Maintenance never changes. You can create this kind of variable to prevent the user from having to enter a value for that particular parameter every time the report runs. You can also do this using a job stream with a fixed saved selection.
Click OK to save the parameter definition.
Runtime Variables and Hard-Coded Reports
Open the report to assign a runtime variable to, and save the selection using the saved selection feature. Recall your saved selection from the Reports > Saved Selection menu. Right-click in the body of the report form to display a menu with a Runtime Variables option.
Select the Runtime Variables option and assign report properties to the runtime variable. Click Add to add a runtime variable and link to a property. The runtime variables are those set up in the Runtime Variable Maintenance form outlined above. When you have selected the runtime variable, select the report property (system defined) associated with the variable.
Click OK to return to the previous form and view the current value of the selected variable. The current value of the runtime variable is set on the Runtime Variable Maintenance form, using the process outlined above.