To add report variables

  1. Open the Tools dashboard and select Report Administration to open the Reporting Services Administration screen.
  2. SelectServer Administration > New Variable. The Variable screen is displayed.
  3. Specify this information for the new variable.

    Note the syntax example:

    Name: @CurrentPeriod

    Value: June 2005

    Type: Literal

    Name

    Specify a name for the variable. Reporting Services prefixes the name with @.

    Value

    Specify a value for the variable.

    Type

    Specify the type for the variable. Type options include Literal and Java Method.

    If you specify a literal value, you must update and maintain that value as necessary. For example, if you are defining a "current period" variable, you must change the value as a new period becomes the current. For example, the value "May 2005" must be changed to "June 2005" when June is the current period.

    If you specify a Java method value, the value specified is a dynamic program that calculates the variable. For example, if you are defining a "current period" variable, the Java class called by the variable value updates the value for "current period" automatically. For example, the value "May 2005" is replaced automatically by "June 2005" when June is the current period.

    Comment

    Optionally, you can specify supporting information for the variable.

  4. Click Save.