What are User Constants & how are they used in SQL-RD?

User constants allow you to compose and create your own set of constants. This can be useful in reducing the amount of work you would need to do.

User Constants Data

Go to User Constants Data.

SSRS. SQL-RD Home Main Menu

SSRS. User Constants in SQL-RD
  • User constants allow you to compose and create your own set of constants. This can be useful in reducing the amount of work you would need to do.
For example, if you have to use several constants to create a report name following a naming convention that is in use in your organization you can create a single User constant that combines these in the format you require and use this constant instead.
  • The User Constants module is accessible from the Advanced Toolbar and from the New... drop down item for the @@User Defined Constants in the Insert Menu.
  • This module allows you to create your own constants using your own formulas.
  • You can use the Insert Menu to enter other constants such as the SQL-RD Constant for the CurrentDateTime above.
  • From the initial screen, you can search and for an existing constant with the option to include the definition of the constant in the search. The matched constants are updated as you type.

Adding a New User Constants Data

  • Click Add.
SSRS. User Constants in SQL-RD

SSRS. Formula Editor in User Constants in SQL-RD
  • Formula Name: The name of the constant.
  • Definition: The definition of the formula.
  • Click Test and then click OK.

This will then be available for use under the @@User Defined Constants name in the Insert Menu.

Remove a User Defined Constant

SSRS. User Constants in SQL-RD
  • Select the User Defined Constant.
  • Click Remove.
SSRS. Deleting a User Constants pop up in SQL-RD
  • Click OK.

Inserting User Constants

  • To insert a user constant, use the inserts feature where available. Select User Constants, then simply drag and drop your desired constant to the desired field.
SSRS. Inserting User Constants in Email Destination in SQL-RD