Using Amper Variables as Parameter Values

When a parameterized report is scheduled, you can set the value of a parameter to a variable, rather than a literal value. This ability reduces the need for a schedule to be updated before it is run. For example, instead of editing a schedule daily in order to display up-to-date information, a report can be scheduled to always display the date of the day that it is running. This is done by setting the value of the parameter as &YYMD. In the Task Parameters dialog box, there is a check box labeled The value contains a system variable, as shown in the following image.

The Task Parameters dialog box. The the value contains a system variable check box is selected

This check box is cleared by default. When this check box is selected, a string beginning with the ampersand character is processed as a variable. When this check box is cleared, the ampersand character is then processed as a literal value. This feature works with both system variables, and global variables that have been set in the Reporting Server global profile edasprof.prf.

To use the &YYMD variable as a parameter value, create or locate a FEX file that contains a date parameter. This date parameter can then be used with the &YYMD variable. The following image shows a Task Parameters dialog box that displays a date parameter named Sale_Date.

A cropped image of the Task Parameters dialog box displaying a date-type parameter

The following image is an example of a distributed report that uses the &YYMD amper variable as a parameter value. The Widgets&More company report distributed on March 27th, 2018 shows the number of items sold on March 27th, 2018, 2017, and 2016.

The Daily Quantity Sold report for the Widgets&More company.

WebFOCUS

Feedback