Runtime Variables
If you have set up a job stream, this function eliminates the need to edit selections for each report in the job stream where 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 saved selection 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 will be linked to the period end date parameter for the AR Tax Summary report. The date 30/09/18 defaults to the report parameters when it runs.
Next, open the AR Summary Report in design view by selecting System > Customisation > Reports. Select the report, and 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 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.
Click No if the default value entered
for the variable in Runtime Variable Maintenance will never change. 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. This
could also be achieved by using a job stream with a fixed saved
selection.
Click OK to save the parameter definition.
Runtime Variables and Hard-Coded Reports
The process for assigning runtime variables to Greentree Desktop's hard-coded reports (for example, GL Transaction Listing, GL Trial Balance) is outlined below. It works with the generic reporting saved selection feature.
Open the report you want to assign a runtime variable to, and save the selection using the saved selection feature. Recall your saved selection using the Greentree Reports > Saved Selection menu. Right-click within 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 available to select are those that have been previously 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 in Runtime Variable Maintenance, as per the process outlined above.