What are User Constants & how are they used in CRD?

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.
Crystal Reports: CRD Home Menu.
Crystal Reports: User Constant in CRD.
  • 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 CRD 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.
Crystal Reports: User Constant in CRD.

 

Crystal Reports: User Constant Formula Editor in CRD.
  • 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

Crystal Reports: User Constant in CRD.
  • Select the User Defined Constant.
  • Click Remove.
Crystal Reports: Delete User constant pop-up in CRD.
  • 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.
Crystal Reports: Using User Constant Email Destination in CRD.

 

Crystal Reports: User Constant Formula Editor in CRD.